diff --git a/homeassistant/components/netatmo/netatmo_entity_base.py b/homeassistant/components/netatmo/netatmo_entity_base.py index 78352e486e016..12798c164f834 100644 --- a/homeassistant/components/netatmo/netatmo_entity_base.py +++ b/homeassistant/components/netatmo/netatmo_entity_base.py @@ -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)}, diff --git a/tests/components/netatmo/test_camera.py b/tests/components/netatmo/test_camera.py index 76397988187b4..0ff55df6caf0d 100644 --- a/tests/components/netatmo/test_camera.py +++ b/tests/components/netatmo/test_camera.py @@ -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 does not have a floodlight",) + assert "NACamera does not have a floodlight" in excinfo.value.args[0] async def test_camera_reconnect_webhook(hass, config_entry):