correct switch bug and rename async functions

This commit is contained in:
vincent committed 2024-02-27 14:52:29 +01:00
1 parent cee71535bf
commit 8eae65de57
8 files changed
+86 -50

No files matched your search

+1 -2
View File
@@ -29,7 +29,6 @@ async def async_setup_entry(hass: HomeAssistant,
stopbits: int = entry.data['Stopbits']
timeout: int = entry.data['Timeout']
#_LOGGER.debug("Appel de async_setup_entry - entry: entry_id={}, data={}".format(entry.entry_id, entry.data))
try:
device = Koolnova(name, port, addr, baudrate, parity, bytesize, stopbits, timeout)
# connect to modbus client
@@ -37,7 +36,7 @@ async def async_setup_entry(hass: HomeAssistant,
# update attributes
await device.update()
# record each area in device
#_LOGGER.debug("Koolnova areas: {}".format(entry.data['areas']))
_LOGGER.debug("Koolnova areas: {}".format(entry.data['areas']))
for area in entry.data['areas']:
await device.add_manual_registered_zone(name=area['Name'],
id_zone=area['Area_id'])