diff --git a/custom_components/lghorizon/media_player.py b/custom_components/lghorizon/media_player.py index 0db2261..c100b4f 100644 --- a/custom_components/lghorizon/media_player.py +++ b/custom_components/lghorizon/media_player.py @@ -4,6 +4,7 @@ import datetime as dt import time import voluptuous as vol +from homeassistant.const import STATE_UNAVAILABLE from homeassistant.helpers import config_validation as cv, entity_platform from homeassistant.components.media_player import ( MediaPlayerEntity, @@ -159,7 +160,7 @@ def state(self): return MediaPlayerState.PLAYING if self._box.state == ONLINE_STANDBY: return MediaPlayerState.OFF - return MediaPlayerState.UNAVAILABLE + return STATE_UNAVAILABLE @property def media_content_type(self):