mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Add device_info to HomematicIP climate and acp (#27771)
This commit is contained in:
parent
81178661ae
commit
564789470e
@ -59,6 +59,17 @@ class HomematicipAlarmControlPanel(AlarmControlPanel):
|
||||
else:
|
||||
self._external_alarm_zone = security_zone
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
"""Return device specific attributes."""
|
||||
return {
|
||||
"identifiers": {(HMIPC_DOMAIN, f"ACP {self._home.id}")},
|
||||
"name": self.name,
|
||||
"manufacturer": "eQ-3",
|
||||
"model": CONST_ALARM_CONTROL_PANEL_NAME,
|
||||
"via_device": (HMIPC_DOMAIN, self._home.id),
|
||||
}
|
||||
|
||||
@property
|
||||
def state(self) -> str:
|
||||
"""Return the state of the device."""
|
||||
|
@ -56,12 +56,23 @@ class HomematicipHeatingGroup(HomematicipGenericDevice, ClimateDevice):
|
||||
|
||||
def __init__(self, hap: HomematicipHAP, device) -> None:
|
||||
"""Initialize heating group."""
|
||||
device.modelType = "Group-Heating"
|
||||
device.modelType = "HmIP-Heating-Group"
|
||||
self._simple_heating = None
|
||||
if device.actualTemperature is None:
|
||||
self._simple_heating = _get_first_heating_thermostat(device)
|
||||
super().__init__(hap, device)
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
"""Return device specific attributes."""
|
||||
return {
|
||||
"identifiers": {(HMIPC_DOMAIN, self._device.id)},
|
||||
"name": self._device.label,
|
||||
"manufacturer": "eQ-3",
|
||||
"model": self._device.modelType,
|
||||
"via_device": (HMIPC_DOMAIN, self._device.homeId),
|
||||
}
|
||||
|
||||
@property
|
||||
def temperature_unit(self) -> str:
|
||||
"""Return the unit of measurement."""
|
||||
@ -176,4 +187,3 @@ def _get_first_heating_thermostat(heating_group: AsyncHeatingGroup):
|
||||
for device in heating_group.devices:
|
||||
if isinstance(device, (AsyncHeatingThermostat, AsyncHeatingThermostatCompact)):
|
||||
return device
|
||||
return None
|
||||
|
Loading…
x
Reference in New Issue
Block a user