mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add device info to Adax (#57907)
This commit is contained in:
parent
9b693f7f2b
commit
bcd431e848
@ -20,9 +20,10 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import ACCOUNT_ID
|
from .const import ACCOUNT_ID, DOMAIN
|
||||||
|
|
||||||
|
|
||||||
async def async_setup_entry(
|
async def async_setup_entry(
|
||||||
@ -59,6 +60,11 @@ class AdaxDevice(ClimateEntity):
|
|||||||
self._adax_data_handler = adax_data_handler
|
self._adax_data_handler = adax_data_handler
|
||||||
|
|
||||||
self._attr_unique_id = f"{heater_data['homeId']}_{heater_data['id']}"
|
self._attr_unique_id = f"{heater_data['homeId']}_{heater_data['id']}"
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
|
identifiers={(DOMAIN, heater_data["id"])},
|
||||||
|
name=self.name,
|
||||||
|
manufacturer="Adax",
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self) -> str:
|
def name(self) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user