diff --git a/homeassistant/components/zimi/__init__.py b/homeassistant/components/zimi/__init__.py index a00dd60ee5f..37244bb49e9 100644 --- a/homeassistant/components/zimi/__init__.py +++ b/homeassistant/components/zimi/__init__.py @@ -51,7 +51,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ZimiConfigEntry) -> bool config_entry_id=entry.entry_id, identifiers={(DOMAIN, api.mac)}, manufacturer=api.brand, - name=f"{api.network_name}", + name=api.network_name, model="Zimi Cloud Connect", sw_version=api.firmware_version, connections={(CONNECTION_NETWORK_MAC, api.mac)}, diff --git a/homeassistant/components/zimi/light.py b/homeassistant/components/zimi/light.py index a93bbb53b3d..d5b7e10d9b3 100644 --- a/homeassistant/components/zimi/light.py +++ b/homeassistant/components/zimi/light.py @@ -32,7 +32,7 @@ async def async_setup_entry( ] lights.extend( - [ZimiDimmer(device, api) for device in api.lights if device.type == "dimmer"] + ZimiDimmer(device, api) for device in api.lights if device.type == "dimmer" ) async_add_entities(lights) @@ -81,8 +81,6 @@ class ZimiDimmer(ZimiLight): super().__init__(device, api) self._attr_color_mode = ColorMode.BRIGHTNESS self._attr_supported_color_modes = {ColorMode.BRIGHTNESS} - if self._device.type != "dimmer": - raise ValueError("ZimiDimmer needs a dimmable light") async def async_turn_on(self, **kwargs: Any) -> None: """Instruct the light to turn on (with optional brightness).""" diff --git a/tests/components/zimi/test_config_flow.py b/tests/components/zimi/test_config_flow.py index 9ec0c624b6f..d7008030fca 100644 --- a/tests/components/zimi/test_config_flow.py +++ b/tests/components/zimi/test_config_flow.py @@ -63,6 +63,10 @@ async def test_user_discovery_success( ) assert result["type"] is FlowResultType.CREATE_ENTRY + assert result["context"] == { + "source": config_entries.SOURCE_USER, + "unique_id": INPUT_MAC, + } assert result["data"] == { "host": INPUT_HOST, "port": INPUT_PORT,