Skip to content

Commit

Permalink
0.10.3.2 - Fixed disconnection counter
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmeghead committed Jan 19, 2025
1 parent 978b0eb commit e6715c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions custom_components/visonic/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
PIN_REGEX,
)

CLIENT_VERSION = "0.10.3.1"
CLIENT_VERSION = "0.10.3.2"

MAX_CLIENT_LOG_ENTRIES = 300

Expand Down Expand Up @@ -322,6 +322,7 @@ def __init__(self, hass: HomeAssistant, panelident: int, cf: dict, entry: Config
self.logstate_debug(f"init panel {str(panelident)} language {str(self.hass.config.language)}")
self._initialise()
self.logstate_info(f"Exclude sensor list = {self.exclude_sensor_list} Exclude x10 list = {self.exclude_x10_list}")
self.panel_disconnection_counter = 0

# get the current date and time
def _getTimeFunction(self) -> datetime:
Expand All @@ -338,7 +339,6 @@ def _initialise(self):
self.visonic_switch_setup_lock = asyncio.Lock()
self.visonic_alarm_setup_lock = asyncio.Lock()

self.panel_disconnection_counter = 0
self.visonicTask = None
self.visonicProtocol : AlPanelInterface = None
self.SystemStarted = False
Expand Down Expand Up @@ -1878,7 +1878,7 @@ async def connect_to_alarm(self) -> bool:

return False

async def async_service_panel_stop(self) -> bool:
async def async_service_panel_stop(self):
"""Service call to stop the connection."""
if not self.SystemStarted:
self.logstate_debug("Request to Stop the HA alarm_control_panel and it is already stopped")
Expand All @@ -1889,7 +1889,7 @@ async def async_service_panel_stop(self) -> bool:

#self.logstate_debug(f"Unloading platforms {self.loaded_platforms=} Entry id={self.getEntryID()} ")
#self.printAllEntities()
unload_ok = True # await self.hass.config_entries.async_unload_platforms(self.entry, self.loaded_platforms)
#unload_ok = True # await self.hass.config_entries.async_unload_platforms(self.entry, self.loaded_platforms)
#self.logstate_debug(f"Unloading complete {unload_ok=}")
#self.printAllEntities()

Expand All @@ -1907,7 +1907,7 @@ async def async_service_panel_stop(self) -> bool:

self._initialise()

return unload_ok
#return unload_ok

async def async_service_panel_start(self, force : bool):
"""Service call to start the connection."""
Expand Down
3 changes: 1 addition & 2 deletions custom_components/visonic/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@
"loggers": ["visonic"],
"requirements": ["Pillow", "pyserial_asyncio"],
"single_config_entry": false,
"version": "0.10.3.1"
"version": "0.10.3.2"
}

0 comments on commit e6715c3

Please sign in to comment.