Cast the volume_level of a universal media_player to a float (#29045)
* Make sure to cast the volume_level of a universal media_player to a float * Fix test that expects the wrong bahaviour * Catch exception instead of checking for None
This commit is contained in:
1 parent
8a413b152d
commit
cc346e57e6
2 files changed
+6
-3
No files matched your search
@@ -539,10 +539,10 @@ class TestMediaPlayer(unittest.TestCase):
|
||||
|
||||
ump = universal.UniversalMediaPlayer(self.hass, **config)
|
||||
|
||||
assert "0" == ump.volume_level
|
||||
assert 0 == ump.volume_level
|
||||
|
||||
self.hass.states.set(self.mock_volume_id, 100)
|
||||
assert "100" == ump.volume_level
|
||||
assert 100 == ump.volume_level
|
||||
|
||||
def test_is_volume_muted_children_and_attr(self):
|
||||
"""Test is volume muted property w/ children and attrs."""
|
||||
|
||||
Reference in new issue
Block a user