mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Update diagnostics for BSBLan (#124508)
* update diagnostics to include static and make room for multiple coordinator data objects * fix mac address is not stored in config_entry but on device
This commit is contained in:
parent
f5e0382123
commit
252f05e0f7
@ -20,5 +20,8 @@ async def async_get_config_entry_diagnostics(
|
|||||||
return {
|
return {
|
||||||
"info": data.info.to_dict(),
|
"info": data.info.to_dict(),
|
||||||
"device": data.device.to_dict(),
|
"device": data.device.to_dict(),
|
||||||
"state": data.coordinator.data.state.to_dict(),
|
"coordinator_data": {
|
||||||
|
"state": data.coordinator.data.state.to_dict(),
|
||||||
|
},
|
||||||
|
"static": data.static.to_dict(),
|
||||||
}
|
}
|
||||||
|
@ -22,10 +22,10 @@ class BSBLanEntity(CoordinatorEntity[BSBLanUpdateCoordinator]):
|
|||||||
def __init__(self, coordinator: BSBLanUpdateCoordinator, data: BSBLanData) -> None:
|
def __init__(self, coordinator: BSBLanUpdateCoordinator, data: BSBLanData) -> None:
|
||||||
"""Initialize BSBLan entity."""
|
"""Initialize BSBLan entity."""
|
||||||
super().__init__(coordinator, data)
|
super().__init__(coordinator, data)
|
||||||
host = self.coordinator.config_entry.data["host"]
|
host = coordinator.config_entry.data["host"]
|
||||||
mac = self.coordinator.config_entry.data["mac"]
|
mac = data.device.MAC
|
||||||
self._attr_device_info = DeviceInfo(
|
self._attr_device_info = DeviceInfo(
|
||||||
identifiers={(DOMAIN, data.device.MAC)},
|
identifiers={(DOMAIN, mac)},
|
||||||
connections={(CONNECTION_NETWORK_MAC, format_mac(mac))},
|
connections={(CONNECTION_NETWORK_MAC, format_mac(mac))},
|
||||||
name=data.device.name,
|
name=data.device.name,
|
||||||
manufacturer="BSBLAN Inc.",
|
manufacturer="BSBLAN Inc.",
|
||||||
|
@ -1,6 +1,52 @@
|
|||||||
# serializer version: 1
|
# serializer version: 1
|
||||||
# name: test_diagnostics
|
# name: test_diagnostics
|
||||||
dict({
|
dict({
|
||||||
|
'coordinator_data': dict({
|
||||||
|
'state': dict({
|
||||||
|
'current_temperature': dict({
|
||||||
|
'data_type': 0,
|
||||||
|
'desc': '',
|
||||||
|
'name': 'Room temp 1 actual value',
|
||||||
|
'unit': '°C',
|
||||||
|
'value': '18.6',
|
||||||
|
}),
|
||||||
|
'hvac_action': dict({
|
||||||
|
'data_type': 1,
|
||||||
|
'desc': 'Raumtemp’begrenzung',
|
||||||
|
'name': 'Status heating circuit 1',
|
||||||
|
'unit': '',
|
||||||
|
'value': '122',
|
||||||
|
}),
|
||||||
|
'hvac_mode': dict({
|
||||||
|
'data_type': 1,
|
||||||
|
'desc': 'Komfort',
|
||||||
|
'name': 'Operating mode',
|
||||||
|
'unit': '',
|
||||||
|
'value': 'heat',
|
||||||
|
}),
|
||||||
|
'hvac_mode2': dict({
|
||||||
|
'data_type': 1,
|
||||||
|
'desc': 'Reduziert',
|
||||||
|
'name': 'Operating mode',
|
||||||
|
'unit': '',
|
||||||
|
'value': '2',
|
||||||
|
}),
|
||||||
|
'room1_thermostat_mode': dict({
|
||||||
|
'data_type': 1,
|
||||||
|
'desc': 'Kein Bedarf',
|
||||||
|
'name': 'Raumthermostat 1',
|
||||||
|
'unit': '',
|
||||||
|
'value': '0',
|
||||||
|
}),
|
||||||
|
'target_temperature': dict({
|
||||||
|
'data_type': 0,
|
||||||
|
'desc': '',
|
||||||
|
'name': 'Room temperature Comfort setpoint',
|
||||||
|
'unit': '°C',
|
||||||
|
'value': '18.5',
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
'device': dict({
|
'device': dict({
|
||||||
'MAC': '00:80:41:19:69:90',
|
'MAC': '00:80:41:19:69:90',
|
||||||
'name': 'BSB-LAN',
|
'name': 'BSB-LAN',
|
||||||
@ -30,48 +76,20 @@
|
|||||||
'value': 'RVS21.831F/127',
|
'value': 'RVS21.831F/127',
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
'state': dict({
|
'static': dict({
|
||||||
'current_temperature': dict({
|
'max_temp': dict({
|
||||||
'data_type': 0,
|
'data_type': 0,
|
||||||
'desc': '',
|
'desc': '',
|
||||||
'name': 'Room temp 1 actual value',
|
'name': 'Summer/winter changeover temp heat circuit 1',
|
||||||
'unit': '°C',
|
'unit': '°C',
|
||||||
'value': '18.6',
|
'value': '20.0',
|
||||||
}),
|
}),
|
||||||
'hvac_action': dict({
|
'min_temp': dict({
|
||||||
'data_type': 1,
|
|
||||||
'desc': 'Raumtemp’begrenzung',
|
|
||||||
'name': 'Status heating circuit 1',
|
|
||||||
'unit': '',
|
|
||||||
'value': '122',
|
|
||||||
}),
|
|
||||||
'hvac_mode': dict({
|
|
||||||
'data_type': 1,
|
|
||||||
'desc': 'Komfort',
|
|
||||||
'name': 'Operating mode',
|
|
||||||
'unit': '',
|
|
||||||
'value': 'heat',
|
|
||||||
}),
|
|
||||||
'hvac_mode2': dict({
|
|
||||||
'data_type': 1,
|
|
||||||
'desc': 'Reduziert',
|
|
||||||
'name': 'Operating mode',
|
|
||||||
'unit': '',
|
|
||||||
'value': '2',
|
|
||||||
}),
|
|
||||||
'room1_thermostat_mode': dict({
|
|
||||||
'data_type': 1,
|
|
||||||
'desc': 'Kein Bedarf',
|
|
||||||
'name': 'Raumthermostat 1',
|
|
||||||
'unit': '',
|
|
||||||
'value': '0',
|
|
||||||
}),
|
|
||||||
'target_temperature': dict({
|
|
||||||
'data_type': 0,
|
'data_type': 0,
|
||||||
'desc': '',
|
'desc': '',
|
||||||
'name': 'Room temperature Comfort setpoint',
|
'name': 'Room temp frost protection setpoint',
|
||||||
'unit': '°C',
|
'unit': '°C',
|
||||||
'value': '18.5',
|
'value': '8.0',
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user