We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31e75a0 commit 1c4d26fCopy full SHA for 1c4d26f
1 file changed
custom_components/battery_notes/coordinator.py
@@ -638,10 +638,10 @@ def last_replaced(self) -> datetime | None:
638
639
if entry:
640
if LAST_REPLACED in entry and entry[LAST_REPLACED] is not None:
641
- last_replaced_date = datetime.fromisoformat(
642
- str(entry[LAST_REPLACED]) + "+00:00"
643
- )
644
- return last_replaced_date
+ entry_last_replaced = str(entry[LAST_REPLACED])
+ if not entry_last_replaced.endswith("+00:00"):
+ entry_last_replaced += "+00:00"
+ return datetime.fromisoformat(entry_last_replaced)
645
return None
646
647
@last_replaced.setter
0 commit comments