mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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",
|
||||
"name": "LG webOS Smart TV",
|
||||
"documentation": "https://www.home-assistant.io/integrations/webostv",
|
||||
"requirements": ["aiopylgtv==0.3.0"],
|
||||
"requirements": ["aiopylgtv==0.3.2"],
|
||||
"dependencies": ["configurator"],
|
||||
"codeowners": ["@bendavid"]
|
||||
}
|
||||
|
@ -227,11 +227,10 @@ class LgWebOSMediaPlayerEntity(MediaPlayerDevice):
|
||||
@property
|
||||
def state(self):
|
||||
"""Return the state of the device."""
|
||||
client_state = self._client.power_state.get("state")
|
||||
if client_state in [None, "Power Off", "Suspend", "Active Standby"]:
|
||||
return STATE_OFF
|
||||
if self._client.is_on:
|
||||
return STATE_ON
|
||||
|
||||
return STATE_ON
|
||||
return STATE_OFF
|
||||
|
||||
@property
|
||||
def is_volume_muted(self):
|
||||
|
@ -190,7 +190,7 @@ aionotion==1.1.0
|
||||
aiopvapi==1.6.14
|
||||
|
||||
# homeassistant.components.webostv
|
||||
aiopylgtv==0.3.0
|
||||
aiopylgtv==0.3.2
|
||||
|
||||
# homeassistant.components.switcher_kis
|
||||
aioswitcher==2019.4.26
|
||||
|
@ -69,7 +69,7 @@ aiohue==1.10.1
|
||||
aionotion==1.1.0
|
||||
|
||||
# homeassistant.components.webostv
|
||||
aiopylgtv==0.3.0
|
||||
aiopylgtv==0.3.2
|
||||
|
||||
# homeassistant.components.switcher_kis
|
||||
aioswitcher==2019.4.26
|
||||
|
Loading…
x
Reference in New Issue
Block a user