Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions homeassistant/components/netatmo/netatmo_entity_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ def async_update_callback(self) -> None:
@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)},
Expand Down
2 changes: 1 addition & 1 deletion tests/components/netatmo/test_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ async def test_service_set_camera_light_invalid_type(hass, config_entry, netatmo
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, config_entry):
Expand Down