mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Update aioairzone to v0.1.0 (#68194)
This commit is contained in:
parent
984e30075b
commit
62c4fed549
@ -1,8 +1,10 @@
|
||||
"""The Airzone integration."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from aioairzone.common import ConnectionOptions
|
||||
from aioairzone.const import AZD_ZONES
|
||||
from aioairzone.const import AZD_ID, AZD_NAME, AZD_SYSTEM, AZD_ZONES
|
||||
from aioairzone.localapi_device import AirzoneLocalApi
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
@ -26,7 +28,7 @@ class AirzoneEntity(CoordinatorEntity):
|
||||
coordinator: AirzoneUpdateCoordinator,
|
||||
entry: ConfigEntry,
|
||||
system_zone_id: str,
|
||||
zone_name: str,
|
||||
zone_data: dict[str, Any],
|
||||
) -> None:
|
||||
"""Initialize."""
|
||||
super().__init__(coordinator)
|
||||
@ -34,9 +36,11 @@ class AirzoneEntity(CoordinatorEntity):
|
||||
self._attr_device_info: DeviceInfo = {
|
||||
"identifiers": {(DOMAIN, f"{entry.entry_id}_{system_zone_id}")},
|
||||
"manufacturer": MANUFACTURER,
|
||||
"name": f"Airzone [{system_zone_id}] {zone_name}",
|
||||
"name": f"Airzone [{system_zone_id}] {zone_data[AZD_NAME]}",
|
||||
}
|
||||
self.system_id = zone_data[AZD_SYSTEM]
|
||||
self.system_zone_id = system_zone_id
|
||||
self.zone_id = zone_data[AZD_ID]
|
||||
|
||||
def get_zone_value(self, key):
|
||||
"""Return zone value by key."""
|
||||
|
@ -3,7 +3,7 @@
|
||||
"name": "Airzone",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/airzone",
|
||||
"requirements": ["aioairzone==0.0.2"],
|
||||
"requirements": ["aioairzone==0.1.0"],
|
||||
"codeowners": ["@Noltari"],
|
||||
"iot_class": "local_polling",
|
||||
"loggers": ["aioairzone"]
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""Support for the Airzone sensors."""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Final
|
||||
from typing import Any, Final
|
||||
|
||||
from aioairzone.const import AZD_HUMIDITY, AZD_NAME, AZD_TEMP, AZD_TEMP_UNIT, AZD_ZONES
|
||||
|
||||
@ -50,8 +50,6 @@ async def async_setup_entry(
|
||||
|
||||
sensors = []
|
||||
for system_zone_id, zone_data in coordinator.data[AZD_ZONES].items():
|
||||
zone_name = zone_data[AZD_NAME]
|
||||
|
||||
for description in SENSOR_TYPES:
|
||||
if description.key in zone_data:
|
||||
sensors.append(
|
||||
@ -60,7 +58,7 @@ async def async_setup_entry(
|
||||
description,
|
||||
entry,
|
||||
system_zone_id,
|
||||
zone_name,
|
||||
zone_data,
|
||||
)
|
||||
)
|
||||
|
||||
@ -76,11 +74,11 @@ class AirzoneSensor(AirzoneEntity, SensorEntity):
|
||||
description: SensorEntityDescription,
|
||||
entry: ConfigEntry,
|
||||
system_zone_id: str,
|
||||
zone_name: str,
|
||||
zone_data: dict[str, Any],
|
||||
) -> None:
|
||||
"""Initialize."""
|
||||
super().__init__(coordinator, entry, system_zone_id, zone_name)
|
||||
self._attr_name = f"{zone_name} {description.name}"
|
||||
super().__init__(coordinator, entry, system_zone_id, zone_data)
|
||||
self._attr_name = f"{zone_data[AZD_NAME]} {description.name}"
|
||||
self._attr_unique_id = f"{entry.entry_id}_{system_zone_id}_{description.key}"
|
||||
self.entity_description = description
|
||||
|
||||
|
@ -107,7 +107,7 @@ aio_geojson_nsw_rfs_incidents==0.4
|
||||
aio_georss_gdacs==0.5
|
||||
|
||||
# homeassistant.components.airzone
|
||||
aioairzone==0.0.2
|
||||
aioairzone==0.1.0
|
||||
|
||||
# homeassistant.components.ambient_station
|
||||
aioambient==2021.11.0
|
||||
|
@ -88,7 +88,7 @@ aio_geojson_nsw_rfs_incidents==0.4
|
||||
aio_georss_gdacs==0.5
|
||||
|
||||
# homeassistant.components.airzone
|
||||
aioairzone==0.0.2
|
||||
aioairzone==0.1.0
|
||||
|
||||
# homeassistant.components.ambient_station
|
||||
aioambient==2021.11.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user