Fix SamsungTV shutdown race condition (#57149)

pull/57165/head
Simone Chemelli 2021-10-06 05:25:57 +02:00 committed by GitHub
parent 7e5dfadc27
commit 9de3bd77d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ class SamsungTVDevice(MediaPlayerEntity):
def update(self) -> None:
"""Update state of device."""
if self._auth_failed:
if self._auth_failed or self.hass.is_stopping:
return
if self._power_off_in_progress():
self._state = STATE_OFF