Fix model in vicare device_info (#74135)
This commit is contained in:
parent
b51ad16db9
commit
b9c135870a
5 changed files with 50 additions and 46 deletions
|
@ -31,6 +31,7 @@ from homeassistant.const import (
|
|||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import entity_platform
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import (
|
||||
|
@ -161,20 +162,20 @@ class ViCareClimate(ClimateEntity):
|
|||
self._current_action = None
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
def unique_id(self) -> str:
|
||||
"""Return unique ID for this device."""
|
||||
return f"{self._device_config.getConfig().serial}-{self._circuit.id}"
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
def device_info(self) -> DeviceInfo:
|
||||
"""Return device info for this device."""
|
||||
return {
|
||||
"identifiers": {(DOMAIN, self._device_config.getConfig().serial)},
|
||||
"name": self._device_config.getModel(),
|
||||
"manufacturer": "Viessmann",
|
||||
"model": (DOMAIN, self._device_config.getModel()),
|
||||
"configuration_url": "https://developer.viessmann.com/",
|
||||
}
|
||||
return DeviceInfo(
|
||||
identifiers={(DOMAIN, self._device_config.getConfig().serial)},
|
||||
name=self._device_config.getModel(),
|
||||
manufacturer="Viessmann",
|
||||
model=self._device_config.getModel(),
|
||||
configuration_url="https://developer.viessmann.com/",
|
||||
)
|
||||
|
||||
def update(self):
|
||||
"""Let HA know there has been an update from the ViCare API."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue