@@ -484,7 +484,7 @@ async def _node_info_load_from_cache(self) -> bool:
484484 if (node_type_str := self ._get_cache (CACHE_NODE_TYPE )) is not None :
485485 node_type = NodeType (int (node_type_str ))
486486
487- relay_state = self ._get_cache (CACHE_RELAY )
487+ relay_state = self ._get_cache (CACHE_RELAY ) == "True"
488488 timestamp = self ._get_cache_as_datetime (CACHE_NODE_INFO_TIMESTAMP )
489489 return await self .update_node_details (
490490 firmware = firmware ,
@@ -577,7 +577,7 @@ async def update_node_details(
577577 self ._node_info .timestamp = timestamp
578578 self ._set_cache (CACHE_NODE_INFO_TIMESTAMP , timestamp )
579579
580- _LOGGER .debug ("Saving Node calibration update to cache for %s" self .mac )
580+ _LOGGER .debug ("Saving Node calibration update to cache for %s" , self .mac )
581581 await self .save_cache ()
582582 if timestamp is not None and timestamp > datetime .now (tz = UTC ) - timedelta (
583583 minutes = 5
@@ -655,7 +655,7 @@ async def unload(self) -> None:
655655 return
656656 if self ._cache_save_task is not None and not self ._cache_save_task .done ():
657657 await self ._cache_save_task
658- _LOGGER .debug ("Writing cache to disk while unloading for %s" self .mac )
658+ _LOGGER .debug ("Writing cache to disk while unloading for %s" , self .mac )
659659 await self .save_cache (trigger_only = False , full_write = True )
660660
661661 def _get_cache (self , setting : str ) -> str | None :
0 commit comments