mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +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
|
@property
|
||||||
def device_info(self):
|
def device_info(self):
|
||||||
"""Return device info."""
|
"""Return device info."""
|
||||||
self._data.device_info(DOMAIN)
|
return self._data.device_info(DOMAIN)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
|
@ -46,6 +46,11 @@ class HarmonyActivitySwitch(ConnectionStateMixin, SwitchEntity):
|
|||||||
"""Return the unique id."""
|
"""Return the unique id."""
|
||||||
return f"{self._data.unique_id}-{self._activity}"
|
return f"{self._data.unique_id}-{self._activity}"
|
||||||
|
|
||||||
|
@property
|
||||||
|
def device_info(self):
|
||||||
|
"""Return device info."""
|
||||||
|
return self._data.device_info(DOMAIN)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_on(self):
|
def is_on(self):
|
||||||
"""Return if the current activity is the one for this switch."""
|
"""Return if the current activity is the one for this switch."""
|
||||||
|
@ -49,6 +49,7 @@ class FakeHarmonyClient:
|
|||||||
self.change_channel = AsyncMock()
|
self.change_channel = AsyncMock()
|
||||||
self.sync = AsyncMock()
|
self.sync = AsyncMock()
|
||||||
self._callbacks = callbacks
|
self._callbacks = callbacks
|
||||||
|
self.fw_version = "123.456"
|
||||||
|
|
||||||
async def connect(self):
|
async def connect(self):
|
||||||
"""Connect and call the appropriate callbacks."""
|
"""Connect and call the appropriate callbacks."""
|
||||||
|
@ -153,7 +153,7 @@ async def test_form_cannot_connect(hass):
|
|||||||
assert result2["errors"] == {"base": "cannot_connect"}
|
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."""
|
"""Test config flow options."""
|
||||||
config_entry = MockConfigEntry(
|
config_entry = MockConfigEntry(
|
||||||
domain=DOMAIN,
|
domain=DOMAIN,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user