From 9c2a025ef47ddda50c3cce21455dd980a3ed0aaa Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 17 Aug 2023 11:18:18 +0200 Subject: [PATCH] Add identifiers attribute to DeviceInfo (#250) * Add identifiers attribute to DeviceInfo Fixes #248 --- custom_components/remote_homeassistant/manifest.json | 2 +- custom_components/remote_homeassistant/sensor.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/remote_homeassistant/manifest.json b/custom_components/remote_homeassistant/manifest.json index 38036dc..22acb6a 100644 --- a/custom_components/remote_homeassistant/manifest.json +++ b/custom_components/remote_homeassistant/manifest.json @@ -13,6 +13,6 @@ "zeroconf": [ "_home-assistant._tcp.local." ], - "version": "3.9", + "version": "3.10", "iot_class": "local_push" } diff --git a/custom_components/remote_homeassistant/sensor.py b/custom_components/remote_homeassistant/sensor.py index d855453..ec9cebf 100644 --- a/custom_components/remote_homeassistant/sensor.py +++ b/custom_components/remote_homeassistant/sensor.py @@ -3,7 +3,7 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect from homeassistant.helpers.entity import DeviceInfo, Entity -from .const import CONF_ENTITY_PREFIX, CONF_SECURE +from .const import DOMAIN, CONF_ENTITY_PREFIX, CONF_SECURE async def async_setup_entry(hass, config_entry, async_add_entities): @@ -28,6 +28,7 @@ def __init__(self, config_entry): self._attr_device_info = DeviceInfo( name="Home Assistant", configuration_url=f"{proto}://{host}:{port}", + identifiers={(DOMAIN, f"remote_{self._attr_unique_id}")}, ) @property