Add code comment in SamsungTV (#68841)

This commit is contained in:
epenet 2022-03-30 08:11:22 +02:00 committed by GitHub
parent df4ddc6491
commit f053fc9167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -459,6 +459,9 @@ class SamsungTVWSBridge(
async def async_is_on(self) -> bool:
"""Tells if the TV is on."""
# On some TVs, opening a websocket turns on the TV
# so first check "PowerState" if device_info has it
# then fallback to default, trying to open a websocket
if self._get_device_spec("PowerState") is not None:
LOGGER.debug("Checking if TV %s is on using device info", self.host)
# Ensure we get an updated value