Add device info to Adax (#57907)

pull/57920/head
Daniel Hjelseth Høyer 2021-10-17 19:40:47 +02:00 committed by GitHub
parent 9b693f7f2b
commit bcd431e848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -20,9 +20,10 @@ from homeassistant.const import (
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import ACCOUNT_ID
from .const import ACCOUNT_ID, DOMAIN
async def async_setup_entry(
@ -59,6 +60,11 @@ class AdaxDevice(ClimateEntity):
self._adax_data_handler = adax_data_handler
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
def name(self) -> str: