You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have updated the integration to the latest version available
I have checked if the problem is already reported
The problem
fetching of: last_loaded_map = sensor_data.get("last_loaded_map", {})
delivers no data, causing no data at all
also resulting in missing calibration data
Error in Card
What version of an integration has described problem?
2024.12.0
What was the last working version of an integration?
2024.10.0
What vacuum model do you have problems with?
Roborock S5
Please firmware installed on your Vacuum.
RE(rand256)
What type of platform you use?
Intel NUC (or generic x86_64)
What version of Home Assistant do you use?
2024.12.0
What type of installation are you running?
Home Assistant OS
Logs or Errors shown in the HA snapshots (please enable the Debug Mode) text will be auto formatted to code.
2024-12-06 08:05:45.897 ERROR (MainThread) [custom_components.mqtt_vacuum_camera.coordinator] Exception raised fetching sensor data: 'NoneType' object has no attribute 'get'
Function, that in your opinion is creating the issue.
Vacuum Status Text
Additional information
Solution:
Adding check:
if not last_loaded_map:
last_loaded_map = {"name": "Unsupported"}
if sensor_data:
# Assume sensor_data is a dictionary or transform it into the expected format
battery_level = await self.connector.get_battery_level()
vacuum_state = await self.connector.get_vacuum_status()
vacuum_room = self.shared.current_room
if not vacuum_room:
vacuum_room = {"in_room": "Unsupported"}
last_run_stats = sensor_data.get("last_run_stats", {})
last_loaded_map = sensor_data.get("last_loaded_map", {})
if not last_loaded_map:
last_loaded_map = {"name": "Unsupported"}
formatted_data = {
"mainBrush": sensor_data.get("mainBrush", 0),
"sideBrush": sensor_data.get("sideBrush", 0),
"filter": sensor_data.get("filter", 0),
"currentCleanTime": sensor_data.get("currentCleanTime", 0),
"currentCleanArea": sensor_data.get("currentCleanArea", 0),
"cleanTime": sensor_data.get("cleanTime", 0),
"cleanArea": sensor_data.get("cleanArea", 0),
"cleanCount": sensor_data.get("cleanCount", 0),
"battery": battery_level,
"state": vacuum_state,
"last_run_start": last_run_stats.get("startTime", 0),
"last_run_end": last_run_stats.get("endTime", 0),
"last_run_duration": last_run_stats.get("duration", 0),
"last_run_area": last_run_stats.get("area", 0),
"last_bin_out": sensor_data.get("last_bin_out", 0),
"last_bin_full": sensor_data.get("last_bin_full", 0),
"last_loaded_map": last_loaded_map.get("name", "NoMap"),
"robot_in_room": vacuum_room.get("in_room", "Unsupported"),
}
return formatted_data
return SENSOR_NO_DATA
The text was updated successfully, but these errors were encountered:
@RocketSience I couldn't replicate the issue yet but I will put on the 2024.12.1 scheduled in the next Wednesday a Try with the exceptions that will avoid this issue. Really sorry for the inconvenience, but there is already a check in place in case the value is None additional the conditional check already in place will be improved as following:
Checklist
The problem
fetching of:
last_loaded_map = sensor_data.get("last_loaded_map", {})
delivers no data, causing no data at all
also resulting in missing calibration data
Error in Card
What version of an integration has described problem?
2024.12.0
What was the last working version of an integration?
2024.10.0
What vacuum model do you have problems with?
Roborock S5
Please firmware installed on your Vacuum.
RE(rand256)
What type of platform you use?
Intel NUC (or generic x86_64)
What version of Home Assistant do you use?
2024.12.0
What type of installation are you running?
Home Assistant OS
Logs or Errors shown in the HA snapshots (please enable the Debug Mode) text will be auto formatted to code.
Function, that in your opinion is creating the issue.
Vacuum Status Text
Additional information
Solution:
Adding check:
if not last_loaded_map:
last_loaded_map = {"name": "Unsupported"}
The text was updated successfully, but these errors were encountered: