Suppress spurious homekit warning about media player sources when the device is off (#37567)

This commit is contained in:
J. Nick Koston 2020-07-06 16:28:26 -05:00 committed by GitHub
parent 706bc4c307
commit c989f6dc09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -431,7 +431,7 @@ class TelevisionMediaPlayer(HomeAccessory):
index = self.sources.index(source_name) index = self.sources.index(source_name)
if self.char_input_source.value != index: if self.char_input_source.value != index:
self.char_input_source.set_value(index) self.char_input_source.set_value(index)
else: elif hk_state:
_LOGGER.warning( _LOGGER.warning(
"%s: Sources out of sync. Restart Home Assistant", self.entity_id, "%s: Sources out of sync. Restart Home Assistant", self.entity_id,
) )