mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Fix entities device_info property in Harmony integration (#45964)
This commit is contained in:
parent
1a74709757
commit
134b1d3f63
@ -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):
|
||||
|
@ -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."""
|
||||
|
@ -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."""
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user