Media player BraviaTv : Try to connect only if tv is not in off state. (#4140)
When HA is restart with the TV in off state there was error log every 10s until the TV is set ON.
This commit is contained in:
1 parent
df68de8032
commit
1e28851280
1 file changed
+2
-1
@@ -219,7 +219,8 @@ class BraviaTVDevice(MediaPlayerDevice):
|
||||
def update(self):
|
||||
"""Update TV info."""
|
||||
if not self._braviarc.is_connected():
|
||||
self._braviarc.connect(self._pin, CLIENTID_PREFIX, NICKNAME)
|
||||
if self._braviarc.get_power_status() != 'off':
|
||||
self._braviarc.connect(self._pin, CLIENTID_PREFIX, NICKNAME)
|
||||
if not self._braviarc.is_connected():
|
||||
return
|
||||
|
||||
|
||||
Reference in new issue
Block a user