Skip to content

Commit

Permalink
fix: use ha converter for local time
Browse files Browse the repository at this point in the history
closes #1217
  • Loading branch information
alandtse committed Mar 16, 2021
1 parent b187683 commit 6c03b9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/alexa_media/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def state(self) -> datetime.datetime:

def _process_state(self, value):
return (
value[self._sensor_property].replace(tzinfo=LOCAL_TIMEZONE).isoformat()
dt.as_local(value[self._sensor_property]).isoformat()
if value
else STATE_UNAVAILABLE
)
Expand Down

0 comments on commit 6c03b9c

Please sign in to comment.