mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Fix state handling for older webos versions (#31099)
* fix state handling for older webos versions * update aiopylgtv to 0.3.2
This commit is contained in:
parent
e16e192b3c
commit
6f1c45257a
@ -2,7 +2,7 @@
|
|||||||
"domain": "webostv",
|
"domain": "webostv",
|
||||||
"name": "LG webOS Smart TV",
|
"name": "LG webOS Smart TV",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/webostv",
|
"documentation": "https://www.home-assistant.io/integrations/webostv",
|
||||||
"requirements": ["aiopylgtv==0.3.0"],
|
"requirements": ["aiopylgtv==0.3.2"],
|
||||||
"dependencies": ["configurator"],
|
"dependencies": ["configurator"],
|
||||||
"codeowners": ["@bendavid"]
|
"codeowners": ["@bendavid"]
|
||||||
}
|
}
|
||||||
|
@ -227,12 +227,11 @@ class LgWebOSMediaPlayerEntity(MediaPlayerDevice):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state of the device."""
|
"""Return the state of the device."""
|
||||||
client_state = self._client.power_state.get("state")
|
if self._client.is_on:
|
||||||
if client_state in [None, "Power Off", "Suspend", "Active Standby"]:
|
|
||||||
return STATE_OFF
|
|
||||||
|
|
||||||
return STATE_ON
|
return STATE_ON
|
||||||
|
|
||||||
|
return STATE_OFF
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_volume_muted(self):
|
def is_volume_muted(self):
|
||||||
"""Boolean if volume is currently muted."""
|
"""Boolean if volume is currently muted."""
|
||||||
|
@ -190,7 +190,7 @@ aionotion==1.1.0
|
|||||||
aiopvapi==1.6.14
|
aiopvapi==1.6.14
|
||||||
|
|
||||||
# homeassistant.components.webostv
|
# homeassistant.components.webostv
|
||||||
aiopylgtv==0.3.0
|
aiopylgtv==0.3.2
|
||||||
|
|
||||||
# homeassistant.components.switcher_kis
|
# homeassistant.components.switcher_kis
|
||||||
aioswitcher==2019.4.26
|
aioswitcher==2019.4.26
|
||||||
|
@ -69,7 +69,7 @@ aiohue==1.10.1
|
|||||||
aionotion==1.1.0
|
aionotion==1.1.0
|
||||||
|
|
||||||
# homeassistant.components.webostv
|
# homeassistant.components.webostv
|
||||||
aiopylgtv==0.3.0
|
aiopylgtv==0.3.2
|
||||||
|
|
||||||
# homeassistant.components.switcher_kis
|
# homeassistant.components.switcher_kis
|
||||||
aioswitcher==2019.4.26
|
aioswitcher==2019.4.26
|
||||||
|
Loading…
x
Reference in New Issue
Block a user