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 {
|
||||
"info": data.info.to_dict(),
|
||||
"device": data.device.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:
|
||||
"""Initialize BSBLan entity."""
|
||||
super().__init__(coordinator, data)
|
||||
host = self.coordinator.config_entry.data["host"]
|
||||
mac = self.coordinator.config_entry.data["mac"]
|
||||
host = coordinator.config_entry.data["host"]
|
||||
mac = data.device.MAC
|
||||
self._attr_device_info = DeviceInfo(
|
||||
identifiers={(DOMAIN, data.device.MAC)},
|
||||
identifiers={(DOMAIN, mac)},
|
||||
connections={(CONNECTION_NETWORK_MAC, format_mac(mac))},
|
||||
name=data.device.name,
|
||||
manufacturer="BSBLAN Inc.",
|
||||
|
@ -1,35 +1,7 @@
|
||||
# serializer version: 1
|
||||
# name: test_diagnostics
|
||||
dict({
|
||||
'device': dict({
|
||||
'MAC': '00:80:41:19:69:90',
|
||||
'name': 'BSB-LAN',
|
||||
'uptime': 969402857,
|
||||
'version': '1.0.38-20200730234859',
|
||||
}),
|
||||
'info': dict({
|
||||
'controller_family': dict({
|
||||
'data_type': 0,
|
||||
'desc': '',
|
||||
'name': 'Device family',
|
||||
'unit': '',
|
||||
'value': '211',
|
||||
}),
|
||||
'controller_variant': dict({
|
||||
'data_type': 0,
|
||||
'desc': '',
|
||||
'name': 'Device variant',
|
||||
'unit': '',
|
||||
'value': '127',
|
||||
}),
|
||||
'device_identification': dict({
|
||||
'data_type': 7,
|
||||
'desc': '',
|
||||
'name': 'Gerte-Identifikation',
|
||||
'unit': '',
|
||||
'value': 'RVS21.831F/127',
|
||||
}),
|
||||
}),
|
||||
'coordinator_data': dict({
|
||||
'state': dict({
|
||||
'current_temperature': dict({
|
||||
'data_type': 0,
|
||||
@ -74,5 +46,51 @@
|
||||
'value': '18.5',
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
'device': dict({
|
||||
'MAC': '00:80:41:19:69:90',
|
||||
'name': 'BSB-LAN',
|
||||
'uptime': 969402857,
|
||||
'version': '1.0.38-20200730234859',
|
||||
}),
|
||||
'info': dict({
|
||||
'controller_family': dict({
|
||||
'data_type': 0,
|
||||
'desc': '',
|
||||
'name': 'Device family',
|
||||
'unit': '',
|
||||
'value': '211',
|
||||
}),
|
||||
'controller_variant': dict({
|
||||
'data_type': 0,
|
||||
'desc': '',
|
||||
'name': 'Device variant',
|
||||
'unit': '',
|
||||
'value': '127',
|
||||
}),
|
||||
'device_identification': dict({
|
||||
'data_type': 7,
|
||||
'desc': '',
|
||||
'name': 'Gerte-Identifikation',
|
||||
'unit': '',
|
||||
'value': 'RVS21.831F/127',
|
||||
}),
|
||||
}),
|
||||
'static': dict({
|
||||
'max_temp': dict({
|
||||
'data_type': 0,
|
||||
'desc': '',
|
||||
'name': 'Summer/winter changeover temp heat circuit 1',
|
||||
'unit': '°C',
|
||||
'value': '20.0',
|
||||
}),
|
||||
'min_temp': dict({
|
||||
'data_type': 0,
|
||||
'desc': '',
|
||||
'name': 'Room temp frost protection setpoint',
|
||||
'unit': '°C',
|
||||
'value': '8.0',
|
||||
}),
|
||||
}),
|
||||
})
|
||||
# ---
|
||||
|
Loading…
x
Reference in New Issue
Block a user