File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -432,6 +432,7 @@ class MSPConfig(BaseModel):
432432 backyard : MSPBackyard = Field (alias = "Backyard" )
433433 groups : list [MSPGroup ] | None = None
434434 schedules : list [MSPSchedule ] | None = None
435+ checksum : int = Field (alias = "CHECKSUM" )
435436
436437 def __init__ (self , ** data : Any ) -> None :
437438 # Extract groups from the Groups container if present
Original file line number Diff line number Diff line change @@ -47,7 +47,6 @@ class OmniLogic:
4747 _api : OmniLogicAPI | OmniLogicMockAPI
4848 _mspconfig_last_updated : float = 0.0
4949 _telemetry_last_updated : float = 0.0
50- _mspconfig_checksum : int = 0
5150 _telemetry_dirty : bool = True
5251 _refresh_lock : asyncio .Lock
5352 # This is the minimum supported MSP version for full functionality
@@ -129,7 +128,7 @@ async def refresh(
129128 update_mspconfig = False
130129 if force_mspconfig :
131130 update_mspconfig = True
132- if self .telemetry .backyard .config_checksum != self ._mspconfig_checksum :
131+ if not hasattr ( self , "mspconfig" ) or self .telemetry .backyard .config_checksum != self .mspconfig . checksum :
133132 update_mspconfig = True
134133
135134 if (
@@ -149,7 +148,6 @@ async def refresh(
149148 if update_mspconfig :
150149 self .mspconfig = await self ._api .async_get_mspconfig ()
151150 self ._mspconfig_last_updated = time .time ()
152- self ._mspconfig_checksum = self .telemetry .backyard .config_checksum
153151
154152 if update_mspconfig or update_telemetry :
155153 self ._update_equipment ()
You can’t perform that action at this time.
0 commit comments