File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
custom_components/battery_notes Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,9 @@ async def async_setup(self) -> bool:
194
194
device_entry = device_registry .async_get (entity .device_id )
195
195
196
196
if device_entry .created_at .year > 1970 :
197
- last_replaced = device_entry .created_at .strftime ("%Y-%m-%dT%H:%M:%S:%f" )
197
+ last_replaced = device_entry .created_at .strftime (
198
+ "%Y-%m-%dT%H:%M:%S:%f"
199
+ )
198
200
else :
199
201
entity = entity_registry .async_get (source_entity_id )
200
202
if entity .created_at .year > 1970 :
@@ -214,7 +216,7 @@ async def async_setup(self) -> bool:
214
216
_LOGGER .debug (
215
217
"Defaulting %s battery last reported to %s" ,
216
218
source_entity_id or device_id ,
217
- last_replaced ,
219
+ last_reported ,
218
220
)
219
221
self .coordinator .last_reported = last_reported
220
222
You can’t perform that action at this time.
0 commit comments