mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 16:27:08 +00:00
Fix netatmo with python 3.11 (#88093)
This commit is contained in:
parent
b21bf8763e
commit
6f38bc274a
@ -92,9 +92,11 @@ class NetatmoBase(Entity):
|
|||||||
@property
|
@property
|
||||||
def device_info(self) -> DeviceInfo:
|
def device_info(self) -> DeviceInfo:
|
||||||
"""Return the device info for the sensor."""
|
"""Return the device info for the sensor."""
|
||||||
manufacturer, model = DEVICE_DESCRIPTION_MAP[
|
if "." in self._model:
|
||||||
getattr(NetatmoDeviceType, 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(
|
return DeviceInfo(
|
||||||
configuration_url=self._config_url,
|
configuration_url=self._config_url,
|
||||||
identifiers={(DOMAIN, self._id)},
|
identifiers={(DOMAIN, self._id)},
|
||||||
|
@ -368,7 +368,7 @@ async def test_service_set_camera_light_invalid_type(
|
|||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
mock_set_state.assert_not_called()
|
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:
|
async def test_camera_reconnect_webhook(hass: HomeAssistant, config_entry) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user