diff --git a/custom_components/alexa_media/sensor.py b/custom_components/alexa_media/sensor.py index 491dae6e..00536ff2 100644 --- a/custom_components/alexa_media/sensor.py +++ b/custom_components/alexa_media/sensor.py @@ -194,6 +194,12 @@ def _fix_alarm_date_time(self, value): value[1][self._sensor_property] = datetime.datetime.fromtimestamp( value[1]["alarmTime"] / 1000, tz=LOCAL_TIMEZONE ) + _LOGGER.warning( + "There is an old format alarm on %s set for %s. " + " This alarm should be removed in the Alexa app and recreated. ", + self._client.name, + dt.as_local(value[1][self._sensor_property]), + ) else: _LOGGER.warning( "%s is returning erroneous data. " @@ -390,7 +396,7 @@ def state(self) -> datetime.datetime: return ( dt.as_local( super()._round_time( - dt.utc_from_timestamp( + datetime.datetime.fromtimestamp( self._timestamp.timestamp() + self._next[self._sensor_property] / 1000 )