mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add DeviceInfo to Sensibo (#62668)
This commit is contained in:
parent
55f4962c06
commit
0ec2978698
@ -36,6 +36,7 @@ from homeassistant.const import (
|
|||||||
)
|
)
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import config_validation as cv
|
from homeassistant.helpers import config_validation as cv
|
||||||
|
from homeassistant.helpers.entity import DeviceInfo
|
||||||
from homeassistant.helpers.entity_platform import (
|
from homeassistant.helpers.entity_platform import (
|
||||||
AddEntitiesCallback,
|
AddEntitiesCallback,
|
||||||
ConfigType,
|
ConfigType,
|
||||||
@ -153,6 +154,16 @@ class SensiboClimate(ClimateEntity):
|
|||||||
self._available = False
|
self._available = False
|
||||||
self._do_update(data)
|
self._do_update(data)
|
||||||
self._failed_update = False
|
self._failed_update = False
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
|
identifiers={(DOMAIN, self._id)},
|
||||||
|
name=self._name,
|
||||||
|
manufacturer="Sensibo",
|
||||||
|
configuration_url="https://home.sensibo.com/",
|
||||||
|
model=data["productModel"],
|
||||||
|
sw_version=data["firmwareVersion"],
|
||||||
|
hw_version=data["firmwareType"],
|
||||||
|
suggested_area=self._name,
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supported_features(self):
|
def supported_features(self):
|
||||||
|
@ -15,4 +15,4 @@ _FETCH_FIELDS = ",".join(
|
|||||||
"temperatureUnit",
|
"temperatureUnit",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
_INITIAL_FETCH_FIELDS = f"id,{_FETCH_FIELDS}"
|
_INITIAL_FETCH_FIELDS = f"id,firmwareVersion,firmwareType,productModel,{_FETCH_FIELDS}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user