diff --git a/custom_components/multimatic/binary_sensor.py b/custom_components/multimatic/binary_sensor.py index d65006f..0a2b0e8 100644 --- a/custom_components/multimatic/binary_sensor.py +++ b/custom_components/multimatic/binary_sensor.py @@ -64,12 +64,12 @@ async def async_setup_entry(hass, entry, async_add_entities): sensors.append(RoomDeviceBattery(rooms_coo, device)) sensors.append(RoomDeviceConnectivity(rooms_coo, device)) - sensors.extend( - [ - HolidayModeSensor(get_coordinator(hass, HOLIDAY_MODE, entry.unique_id)), - QuickModeSensor(get_coordinator(hass, QUICK_MODE, entry.unique_id)), - ] - ) + sensors.extend( + [ + HolidayModeSensor(get_coordinator(hass, HOLIDAY_MODE, entry.unique_id)), + QuickModeSensor(get_coordinator(hass, QUICK_MODE, entry.unique_id)), + ] + ) _LOGGER.info("Adding %s binary sensor entities", len(sensors)) @@ -445,18 +445,18 @@ def state_attributes(self): """Return the state attributes.""" state_attributes = {} if self.coordinator.data.errors: + errors = [] for error in self.coordinator.data.errors: - state_attributes.update( + errors.append( { - error.status_code: { - "status_code": error.status_code, - "title": error.title, - "timestamp": error.timestamp, - "description": error.description, - "device_name": error.device_name, - } + "status_code": error.status_code, + "title": error.title, + "timestamp": error.timestamp, + "description": error.description, + "device_name": error.device_name, } ) + state_attributes["errors"] = errors return state_attributes @property diff --git a/custom_components/multimatic/manifest.json b/custom_components/multimatic/manifest.json index e9c2961..4d2a1df 100644 --- a/custom_components/multimatic/manifest.json +++ b/custom_components/multimatic/manifest.json @@ -14,6 +14,6 @@ "codeowners": [ "@thomasgermain" ], - "version": "1.8.0", + "version": "1.8.1", "iot_class": "cloud_polling" }