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
|
@ -19,6 +19,7 @@ from homeassistant.components.binary_sensor import (
|
|||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from . import ViCareRequiredKeysMixin
|
||||
|
@ -198,15 +199,15 @@ class ViCareBinarySensor(BinarySensorEntity):
|
|||
self._state = None
|
||||
|
||||
@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/",
|
||||
)
|
||||
|
||||
@property
|
||||
def available(self):
|
||||
|
@ -214,7 +215,7 @@ class ViCareBinarySensor(BinarySensorEntity):
|
|||
return self._state is not None
|
||||
|
||||
@property
|
||||
def unique_id(self):
|
||||
def unique_id(self) -> str:
|
||||
"""Return unique ID for this device."""
|
||||
tmp_id = (
|
||||
f"{self._device_config.getConfig().serial}-{self.entity_description.key}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue