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)},
|
||||
|
|
|
@ -368,7 +368,7 @@ async def test_service_set_camera_light_invalid_type(
|
|||
await hass.async_block_till_done()
|
||||
|
||||
mock_set_state.assert_not_called()
|
||||
assert excinfo.value.args == ("NACamera <Hall> does not have a floodlight",)
|
||||
assert "NACamera <Hall> does not have a floodlight" in excinfo.value.args[0]
|
||||
|
||||
|
||||
async def test_camera_reconnect_webhook(hass: HomeAssistant, config_entry) -> None:
|
||||
|
|
Loading…
Add table
Reference in a new issue