Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Михаил Шутов committed Feb 7, 2024
2 parents 1141b32 + ee555c3 commit 7a50084
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 20 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* *H2000*
* *H1000*
* *H1000+*
* *T100*

## Возможности
В НА из ZONT добавляются следующие объекты каждого устройства:
Expand Down
2 changes: 0 additions & 2 deletions custom_components/zont_ha/alarm_control_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ async def async_setup_entry(
for device in zont.data.devices:
alarms = []
guard_zones = device.guard_zones
if guard_zones in None:
guard_zones = []
for guard_zone in guard_zones:
unique_id = f'{entry_id}{device.id}{guard_zone.id}'
alarms.append(ZontAlarm(
Expand Down
2 changes: 0 additions & 2 deletions custom_components/zont_ha/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ async def async_setup_entry(
for device in zont.data.devices:
binary_sensors = []
sensors = device.sensors
if sensors in None:
sensors = []
for sensor in sensors:
unique_id = f'{entry_id}{device.id}{sensor.id}'
if sensor.type in BINARY_SENSOR_TYPES:
Expand Down
2 changes: 0 additions & 2 deletions custom_components/zont_ha/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ async def async_setup_entry(
for device in zont.data.devices:
buttons = []
controls = device.custom_controls
if controls in None:
controls = []
for control in controls:
if control.type == BUTTON_ZONT:
unique_id = f'{entry_id}{device.id}{control.id}'
Expand Down
12 changes: 6 additions & 6 deletions custom_components/zont_ha/core/models_zont.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ class DeviceZONT(BaseEntityZONT):
widget_type: str
heating_circuits: list[HeatingCircuitZONT]
heating_modes: list[HeatingModeZONT]
boiler_modes: list[BoilerModeZONT] | None
sensors: list[SensorZONT] | None
ot_sensors: list[OTSensorZONT] | None
guard_zones: list[GuardZoneZONT] | None
custom_controls: list[CustomControlZONT] | None
scenarios: list[ScenarioZONT] | None
boiler_modes: list[BoilerModeZONT] = []
sensors: list[SensorZONT] = []
ot_sensors: list[OTSensorZONT] = []
guard_zones: list[GuardZoneZONT] = []
custom_controls: list[CustomControlZONT] = []
scenarios: list[ScenarioZONT] = []


class AccountZont(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion custom_components/zont_ha/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"integration_type": "hub",
"dependencies": ["http", "zeroconf"],
"requirements": [],
"version": "0.2.2"
"version": "0.2.3"
}
4 changes: 0 additions & 4 deletions custom_components/zont_ha/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ async def async_setup_entry(
sens = []
sensors = device.sensors
ot_sensors = device.ot_sensors
if sensors is None:
sensors = []
if ot_sensors is None:
ot_sensors = []
for sensor in sensors:
unique_id = f'{entry_id}{device.id}{sensor.id}'
if sensor.type not in BINARY_SENSOR_TYPES:
Expand Down
2 changes: 0 additions & 2 deletions custom_components/zont_ha/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ async def async_setup_entry(
for device in zont.data.devices:
switch = []
controls = device.custom_controls
if controls in None:
controls = []
for control in controls:
if control.type == SWITCH_ZONT:
unique_id = f'{entry_id}{device.id}{control.id}'
Expand Down

0 comments on commit 7a50084

Please sign in to comment.