Fix netatmo with python 3.11 (#88093)
This commit is contained in:
parent
b21bf8763e
commit
6f38bc274a
2 changed files with 6 additions and 4 deletions
|
@ -92,9 +92,11 @@ class NetatmoBase(Entity):
|
|||
@property
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return the device info for the sensor."""
|
||||
manufacturer, model = DEVICE_DESCRIPTION_MAP[
|
||||
getattr(NetatmoDeviceType, self._model)
|
||||
]
|
||||
if "." in self._model:
|
||||
netatmo_device = NetatmoDeviceType(self._model.partition(".")[2])
|
||||
else:
|
||||
netatmo_device = getattr(NetatmoDeviceType, self._model)
|
||||
manufacturer, model = DEVICE_DESCRIPTION_MAP[netatmo_device]
|
||||
return DeviceInfo(
|
||||
configuration_url=self._config_url,
|
||||
identifiers={(DOMAIN, self._id)},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue