netatmo: bump pyatmo v9.4.0 (#169735)

Co-authored-by: Erik Montnemery <erik@montnemery.com>
This commit is contained in:
Zoltán Farkasdi
2026-05-06 09:16:22 +02:00
committed by GitHub
co-authored by Erik Montnemery
parent 073b20c4b2
commit d89bcd83d9
12 changed files with 39 additions and 12 deletions
+2 -3
View File
@@ -12,6 +12,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import CONF_URL_CONTROL, NETATMO_CREATE_BUTTON
from .data_handler import HOME, SIGNAL_NAME, NetatmoConfigEntry, NetatmoDevice
from .entity import NetatmoModuleEntity
from .helper import device_type_to_str
_LOGGER = logging.getLogger(__name__)
@@ -55,9 +56,7 @@ class NetatmoCoverPreferredPositionButton(NetatmoModuleEntity, ButtonEntity):
},
]
)
self._attr_unique_id = (
f"{self.device.entity_id}-{self.device_type}-preferred_position"
)
self._attr_unique_id = f"{self.device.entity_id}-{device_type_to_str(self.device_type)}-preferred_position"
@callback
def async_update_callback(self) -> None:
+4 -1
View File
@@ -42,6 +42,7 @@ from .const import (
)
from .data_handler import EVENT, HOME, SIGNAL_NAME, NetatmoConfigEntry, NetatmoDevice
from .entity import NetatmoModuleEntity
from .helper import device_type_to_str
_LOGGER = logging.getLogger(__name__)
@@ -102,7 +103,9 @@ class NetatmoCamera(NetatmoModuleEntity, Camera):
Camera.__init__(self)
super().__init__(netatmo_device)
self._attr_unique_id = f"{netatmo_device.device.entity_id}-{self.device_type}"
self._attr_unique_id = (
f"{netatmo_device.device.entity_id}-{device_type_to_str(self.device_type)}"
)
self._light_state = None
self._publishers.extend(
+4 -1
View File
@@ -54,6 +54,7 @@ from .const import (
)
from .data_handler import HOME, SIGNAL_NAME, NetatmoConfigEntry, NetatmoRoom
from .entity import NetatmoRoomEntity
from .helper import device_type_to_str
_LOGGER = logging.getLogger(__name__)
@@ -219,7 +220,9 @@ class NetatmoThermostat(NetatmoRoomEntity, ClimateEntity):
if self.device_type is NA_THERM:
self._attr_hvac_modes.append(HVACMode.OFF)
self._attr_unique_id = f"{self.device.entity_id}-{self.device_type}"
self._attr_unique_id = (
f"{self.device.entity_id}-{device_type_to_str(self.device_type)}"
)
async def async_added_to_hass(self) -> None:
"""Entity created."""
+4 -1
View File
@@ -18,6 +18,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import CONF_URL_CONTROL, NETATMO_CREATE_COVER
from .data_handler import HOME, SIGNAL_NAME, NetatmoConfigEntry, NetatmoDevice
from .entity import NetatmoModuleEntity
from .helper import device_type_to_str
_LOGGER = logging.getLogger(__name__)
@@ -70,7 +71,9 @@ class NetatmoCover(NetatmoModuleEntity, CoverEntity):
},
]
)
self._attr_unique_id = f"{self.device.entity_id}-{self.device_type}"
self._attr_unique_id = (
f"{self.device.entity_id}-{device_type_to_str(self.device_type)}"
)
async def async_close_cover(self, **kwargs: Any) -> None:
"""Close the cover."""
+4 -1
View File
@@ -13,6 +13,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import CONF_URL_CONTROL, NETATMO_CREATE_FAN
from .data_handler import HOME, SIGNAL_NAME, NetatmoConfigEntry, NetatmoDevice
from .entity import NetatmoModuleEntity
from .helper import device_type_to_str
_LOGGER = logging.getLogger(__name__)
@@ -62,7 +63,9 @@ class NetatmoFan(NetatmoModuleEntity, FanEntity):
]
)
self._attr_unique_id = f"{self.device.entity_id}-{self.device_type}"
self._attr_unique_id = (
f"{self.device.entity_id}-{device_type_to_str(self.device_type)}"
)
async def async_set_preset_mode(self, preset_mode: str) -> None:
"""Set the preset mode of the fan."""
@@ -3,6 +3,16 @@
from dataclasses import dataclass
from uuid import UUID, uuid4
from pyatmo.modules.device_types import DeviceType as NetatmoDeviceType
def device_type_to_str(device_type: NetatmoDeviceType) -> str:
"""Convert a device type to a string.
Used to generate backwards compatible unique ids.
"""
return f"{type(device_type).__name__}.{device_type}"
@dataclass
class NetatmoArea:
@@ -12,5 +12,5 @@
"integration_type": "hub",
"iot_class": "cloud_polling",
"loggers": ["pyatmo"],
"requirements": ["pyatmo==9.2.3"]
"requirements": ["pyatmo==9.4.0"]
}
+4 -1
View File
@@ -13,6 +13,7 @@ from homeassistant.helpers.entity_platform import AddConfigEntryEntitiesCallback
from .const import CONF_URL_CONTROL, NETATMO_CREATE_SWITCH
from .data_handler import HOME, SIGNAL_NAME, NetatmoConfigEntry, NetatmoDevice
from .entity import NetatmoModuleEntity
from .helper import device_type_to_str
_LOGGER = logging.getLogger(__name__)
@@ -58,7 +59,9 @@ class NetatmoSwitch(NetatmoModuleEntity, SwitchEntity):
},
]
)
self._attr_unique_id = f"{self.device.entity_id}-{self.device_type}"
self._attr_unique_id = (
f"{self.device.entity_id}-{device_type_to_str(self.device_type)}"
)
self._attr_is_on = self.device.on
@callback
+1 -1
View File
@@ -1990,7 +1990,7 @@ pyaprilaire==0.9.1
pyatag==0.3.5.3
# homeassistant.components.netatmo
pyatmo==9.2.3
pyatmo==9.4.0
# homeassistant.components.apple_tv
pyatv==0.17.0
+1 -1
View File
@@ -1727,7 +1727,7 @@ pyaprilaire==0.9.1
pyatag==0.3.5.3
# homeassistant.components.netatmo
pyatmo==9.2.3
pyatmo==9.4.0
# homeassistant.components.apple_tv
pyatv==0.17.0
@@ -174,7 +174,7 @@
'entity_picture': '/api/camera_proxy/camera.netatmo_doorbell?token=1caab5c3b3',
'friendly_name': 'Netatmo-Doorbell',
'id': '12:34:56:10:f1:66',
'is_local': None,
'is_local': False,
'light_state': None,
'local_url': None,
'monitoring': True,
@@ -581,6 +581,7 @@
'access_camera',
'access_doorbell',
'access_presence',
'access_camerapro',
'read_bubendorff',
'read_bfi',
'read_camera',
@@ -595,6 +596,7 @@
'read_smokedetector',
'read_station',
'read_thermostat',
'read_camerapro',
'write_bubendorff',
'write_bfi',
'write_camera',
@@ -604,6 +606,7 @@
'write_presence',
'write_smarther',
'write_thermostat',
'write_camerapro',
]),
'type': 'Bearer',
}),