diff --git a/homeassistant/components/harmony/remote.py b/homeassistant/components/harmony/remote.py index 8409983789b..9b3d53c21fa 100644 --- a/homeassistant/components/harmony/remote.py +++ b/homeassistant/components/harmony/remote.py @@ -161,7 +161,7 @@ class HarmonyRemote(ConnectionStateMixin, remote.RemoteEntity, RestoreEntity): @property def device_info(self): """Return device info.""" - self._data.device_info(DOMAIN) + return self._data.device_info(DOMAIN) @property def unique_id(self): diff --git a/homeassistant/components/harmony/switch.py b/homeassistant/components/harmony/switch.py index 5fae07c431b..2832872c2ef 100644 --- a/homeassistant/components/harmony/switch.py +++ b/homeassistant/components/harmony/switch.py @@ -46,6 +46,11 @@ class HarmonyActivitySwitch(ConnectionStateMixin, SwitchEntity): """Return the unique id.""" return f"{self._data.unique_id}-{self._activity}" + @property + def device_info(self): + """Return device info.""" + return self._data.device_info(DOMAIN) + @property def is_on(self): """Return if the current activity is the one for this switch.""" diff --git a/tests/components/harmony/conftest.py b/tests/components/harmony/conftest.py index e758a2795a9..cde8c43fe89 100644 --- a/tests/components/harmony/conftest.py +++ b/tests/components/harmony/conftest.py @@ -49,6 +49,7 @@ class FakeHarmonyClient: self.change_channel = AsyncMock() self.sync = AsyncMock() self._callbacks = callbacks + self.fw_version = "123.456" async def connect(self): """Connect and call the appropriate callbacks.""" diff --git a/tests/components/harmony/test_config_flow.py b/tests/components/harmony/test_config_flow.py index 52ef71fc8bc..2a7f80d5c2f 100644 --- a/tests/components/harmony/test_config_flow.py +++ b/tests/components/harmony/test_config_flow.py @@ -153,7 +153,7 @@ async def test_form_cannot_connect(hass): assert result2["errors"] == {"base": "cannot_connect"} -async def test_options_flow(hass, mock_hc): +async def test_options_flow(hass, mock_hc, mock_write_config): """Test config flow options.""" config_entry = MockConfigEntry( domain=DOMAIN,