albaintor / homeassistant_electrolux_status

Get the status from your Electrolux Care devices
MIT License
86 stars 20 forks source link

Time to end not reaching 0 after update #70

Closed Imperial-Guard closed 2 weeks ago

Imperial-Guard commented 2 weeks ago

First off all thanks @albaintor and @kingy444 for all your work into this.

It seems to be that my oven is not reaching 0 after the latest version and is stuck on 1 min. Please see attached logs below.

2024-10-15 09:43:16.638 DEBUG (MainThread) [custom_components.electrolux_status] async_setup_entry setup_entities 2024-10-15 09:43:16.638 DEBUG (MainThread) [custom_components.electrolux_status] Electrolux setup_entities 2024-10-15 09:43:16.754 DEBUG (MainThread) [custom_components.electrolux_status] Electrolux get_appliances_list <pyelectroluxocp.oneAppApi.OneAppApi object at 0x14666776ef60> [{"applianceId": "944066778_02:23506765-443E0739F542", "applianceData": {"applianceName": "Mijn oven", "created": "2022-10-28T13:46:22.158Z", "modelName": "OV"}, "properties": {"desired": {}, "reported": {"doorState": "CLOSED", "temperatureRepresentation": "CELSIUS", "timeToEnd": 60, "remoteControl": "ENABLED", "targetTemperatureF": 176.0, "targetTemperatureC": 80.0, "program": "KEEP_WARM", "displayFoodProbeTemperatureC": 0.0, "waterTrayInsertionState": "INSERTED", "waterTankEmpty": "STEAM_TANK_FULL", "startTime": -1, "targetDuration": 0, "applianceInfo": {"applianceType": "OV"}, "displayFoodProbeTemperatureF": 32.0, "targetFoodProbeTemperatureC": -17.833333333333332, "targetFoodProbeTemperatureF": -0.1, "runningTime": 0, "applianceState": "END_OF_CYCLE", "alerts": [], "displayTemperatureC": 63.0, "networkInterface": {"linkQualityIndicator": "VERY_GOOD", "otaState": "IDLE"}, "foodProbeInsertionState": "NOT_INSERTED", "displayTemperatureF": 145.4, "cavityLight": false, "processPhase": "NONE", "connectivityState": "connected"}, "metadata": {}}, "status": "enabled", "connectionState": "connected"}] 2024-10-15 09:43:16.754 DEBUG (MainThread) [custom_components.electrolux_status] Electrolux found appliance 944066778_02:23506765-443E0739F542 2024-10-15 09:43:16.800 DEBUG (MainThread) [custom_components.electrolux_status] Electrolux get_appliances_info result: [{"pnc": "944066778", "brand": "AEG", "market": "EUROPE", "productArea": "TASTE", "deviceType": "BUILT-IN OVEN", "project": "AEG VISION", "model": "KSK998230T", "variant": "STEAMPRO", "colour": "MATT BLACK", "status": 1, "elc": "02", "configurationName": null, "productionReady": false}] 2024-10-15 09:43:16.864 DEBUG (MainThread) [custom_components.electrolux_status] Electrolux get_appliance_state result: {"applianceId": "944066778_02:23506765-443E0739F542", "applianceData": {"applianceName": "Mijn oven", "created": "2022-10-28T13:46:22.158Z", "modelName": "OV"}, "properties": {"desired": {}, "reported": {"doorState": "CLOSED", "temperatureRepresentation": "CELSIUS", "timeToEnd": 60, "remoteControl": "ENABLED", "targetTemperatureF": 176.0, "targetTemperatureC": 80.0, "program": "KEEP_WARM", "displayFoodProbeTemperatureC": 0.0, "waterTrayInsertionState": "INSERTED", "waterTankEmpty": "STEAM_TANK_FULL", "startTime": -1, "targetDuration": 0, "applianceInfo": {"applianceType": "OV"}, "displayFoodProbeTemperatureF": 32.0, "targetFoodProbeTemperatureC": -17.833333333333332, "targetFoodProbeTemperatureF": -0.1, "runningTime": 0, "applianceState": "END_OF_CYCLE", "alerts": [], "displayTemperatureC": 63.0, "networkInterface": {"linkQualityIndicator": "VERY_GOOD", "otaState": "IDLE"}, "foodProbeInsertionState": "NOT_INSERTED", "displayTemperatureF": 145.4, "cavityLight": false, "processPhase": "NONE", "connectivityState": "connected"}, "metadata": {}}, "status": "enabled", "connectionState": "connected"}

2024-10-15 09:43:17.075 DEBUG (MainThread) [custom_components.electrolux_status] Electrolux get_appliance_capabilities result: {"alerts": {"access": "read", "type": "alert", "values": {"AD_CONVERTER_REFERENCE_ALARM": {}, "BACKLIGHT_ALARM": {}, "BOARD_TEMPERATURE_ALARM": {}, "COMMUNICATION_ALARM_BETWEEN_TWO_CONTROLLERS": {}, "COMMUNICATION_ALARM_OUI_OC": {}, "CONFIGURATION_CHECKSUM_ALARM": {}, "CONFIGURATION_COHERENT_ALARM": {}, "CONFIGURATION_COMPATIBILITY_ALARM": {}, "COOKING_FAN_CONFIG_ALARM": {}, "DATA_FLASH_ALARM_UI": {}, "DOOR_LOCK_ACTUATOR": {}, "DOOR_LOCK_CONFIGURATION_ALARM": {}, "DOOR_LOCK_SENSOR_ALARM": {}, "ELECTRONIC_CLIXON_ALARM": {}, "FIX_SENSOR_DETECTION_ALARM": {}, "FOOD_PROBE_COMMUNICATION_ALARM": {}, "FOOD_PROBE_CONFIGURATION_ALARM": {}, "FUNCTION_SELECTOR_NOT_CONNECTED": {}, "HMI-TOUCH_BOARD_FMEA_ALARM": {}, "HMI-TOUCH_BOARD_SERIAL_COMMUNICATION_ALARM": {}, "HOB_OVEN_COMMUNICATION_ALARM": {}, "HOB_OVEN_POWER_MANAGEMENT_ALARM": {}, "HUMIDITY_SENSOR_OUT_OF_RANGE_ALARM": {}, "INTERNAL_ERROR": {}, "LIB_FMEA_ALARM_ROTARY_GRAB": {}, "MACS_COMMNUNICATION_ERROR": {}, "MEAT_PROBE_OUT_OF_RANGE_ALARM": {}, "NETVM_COMMUNICATION_ALARM": {}, "NIUX_COMMUNICATION_ALARM": {}, "NIUX_ONBOARDING_FAILED_ALARM": {}, "NTC_OUT_OF_RANGE_ALARM": {}, "OTA_FAILURE": {}, "PERIPHERAL_INIT_ALARM_ROTARY_SERIAL_COMMUNICATION_ALARM": {}, "PERIPHERAL_RUNTIME_ALARM_ROTARY_BIT_ENCODER_ALARM": {}, "POWER_ALARM": {}, "PT500_OUT_OF_RANGE_ALARM": {}, "PT500_STEAM_OUT_OF_RANGE_ALARM": {}, "PTO_COMMUNICATION_ALARM_OUI_PTO": {}, "PTO_CONFIGURATION_CHECKSUM_ALARM": {}, "PTO_KEY_ALARM": {}, "PTO_LIB_FMEA_ALARM": {}, "PYR_HOB_ALARM": {}, "ROTARY_TOUCH_ALARM": {}, "RTC_ALARM": {}, "RTC_OUT_OF_RANGE_ALARM": {}, "SMART_ADC_ERROR": {}, "SMART_AD_CALIBRATION_RUNNING_ERROR": {}, "SMART_COMMUNICATION_ALARM_OUI_SC": {}, "SMART_ERROR_UNKNOWN": {}, "SMART_HIGH_START_TEMPERATURE": {}, "SMART_INVALID_CONFIGURATION_ERROR": {}, "SMART_NO_START_TEMPERATURE": {}, "SMART_READ_FLASH_ERROR": {}, "SOFTWARE_COMPATIBILITY_CODE_ALARM": {}, "STEAM_MAGNETRON_NTC": {}, "TOO_HIGH_TEMPERATURE_ALARM": {}, "TOUCHSCREEN_DRIVER_ALARM": {}, "TOUCH_KEY_1_ALARM": {}, "TOUCH_KEY_ALARM": {}, "TRIAC_ALARM": {}, "UNKNOWN_STATE_ERROR": {}, "USB_CAMERA_DISCONNECTED_ALARM": {}, "WATER_LEVEL_SENSOR_IN_STEAMER_OUT_OF_RANGE_ALARM": {}, "WATER_LEVEL_SENSOR_IN_STEAM_TANK_DRAWER_OUT_OF_RANGE_ALARM": {}, "WIFI_SIGNAL_MISS_ALARM": {}}}, "applianceState": {"access": "read", "triggers": [{"action": {"executeCommand": {"access": "write", "values": {"STOPRESET": {}}}}, "condition": {"operand_1": "value", "operand_2": "RUNNING", "operator": "eq"}}, {"action": {"executeCommand": {"access": "write", "values": {"STOPRESET": {}}}}, "condition": {"operand_1": "value", "operand_2": "PAUSED", "operator": "eq"}}, {"action": {"executeCommand": {"access": "write", "values": {"START": {}}}}, "condition": {"operand_1": "value", "operand_2": "READY_TO_START", "operator": "eq"}}, {"action": {"$self": {"access": "read"}}, "condition": {"operand_1": "value", "operand_2": "ALARM", "operator": "eq"}}, {"action": {"executeCommand": {"access": "write", "values": {"STOPRESET": {}}}}, "condition": {"operand_1": "value", "operand_2": "DELAYED_START", "operator": "eq"}}, {"action": {"executeCommand": {"access": "write", "values": {"START": {}}}}, "condition": {"operand_1": "value", "operand_2": "END_OF_CYCLE", "operator": "eq"}}], "type": "string", "values": {"ALARM": {}, "DELAYED_START": {}, "END_OF_CYCLE": {}, "IDLE": {}, "OFF": {}, "PAUSED": {}, "READY_TO_START": {}, "RUNNING": {}}}, "cavityLight": {"access": "readwrite", "type": "boolean", "values": {"OFF": {}, "ON": {}}}, "displayFoodProbeTemperatureC": {"access": "read", "type": "temperature"}, "displayFoodProbeTemperatureF": {"access": "read", "type": "temperature"}, "displayTemperatureC": {"access": "read", "type": "temperature"}, "displayTemperatureF": {"access": "read", "type": "temperature"}, "doorState": {"access": "read", "type": "string", "values": {"CLOSED": {}, "OPEN": {}}}, "executeCommand": {"access": "write", "type": "string", "values": {"OFF": {}, "ON": {}, "RESUME": {}, "START": {}, "STOPRESET": {}}}, "foodProbeInsertionState": {"access": "read", "type": "string", "values": {"INSERTED": {}, "NOT_INSERTED": {}}}, "networkInterface": {"command": {"access": "write", "type": "string", "values": {"ABORT": {}, "APPLIANCE_AUTHORIZE": {}, "DOWNLOAD": {}, "START": {}, "USER_AUTHORIZE": {}, "USER_NOT_AUTHORIZE": {}}}, "linkQualityIndicator": {"access": "read", "type": "string", "values": {"EXCELLENT": {}, "GOOD": {}, "POOR": {}, "UNDEFINED": {}, "VERY_GOOD": {}, "VERY_POOR": {}}}, "niuSwUpdateCurrentDescription": {"access": "read", "type": "string"}, "otaState": {"access": "read", "type": "string", "values": {"DESCRIPTION_AVAILABLE": {}, "DESCRIPTION_DOWNLOADING": {}, "DESCRIPTION_READY": {}, "FW_DOWNLOADING": {}, "FW_DOWNLOAD_START": {}, "FW_SIGNATURE_CHECK": {}, "FW_UPDATE_IN_PROGRESS": {}, "IDLE": {}, "READY_TO_UPDATE": {}, "UPDATE_ABORT": {}, "UPDATE_CHECK": {}, "UPDATE_ERROR": {}, "UPDATE_OK": {}, "WAITINGFORAUTHORIZATION": {}}}, "startUpCommand": {"access": "write", "type": "string", "values": {"UNINSTALL": {}}}, "swAncAndRevision": {"access": "read", "type": "string"}, "swVersion": {"access": "read", "type": "string"}}, "program": {"access": "readwrite", "type": "string", "values": {"AUGRATIN": {"startTime": {"access": "readwrite", "default": "INVALID_OR_NOT_SET_TIME", "disabled": false, "max": 86340, "min": 0, "step": 60, "values": {"INVALID_OR_NOT_SET_TIME": {"disabled": true}}}, "targetDuration": {"access": "readwrite", "disabled": false, "max": 86340, "min": 0, "step": 60}, "targetFoodProbeTemperatureC": {"access": "readwrite", "default": 60, "disabled": false, "max": 99, "min": 30, "step": 1, "type": "temperature"}, "targetFoodProbeTemperatureF": {"access": "readwrite", "default": 140.0, "disabled": false, "max": 210.2, "min": 86.0, "step": 1, "type": "temperature"}, "targetTemperatureC": {"access": "readwrite", "default": 230.0, "disabled": false, "max": 230.0, "min": 80.0, "step": 5.0, "type": "temperature"}, "targetTemperatureF": {"access": "readwrite", "default": 446.0, "disabled": false, "max": 446.0, "min": 176.0, "step": 5.0, "type": "temperature"}}, "BOTTOM": {"startTime": {"access": "readwrite", "default": "INVALID_OR_NOT_SET_TIME", "disabled": false, "max": 86340, "min": 0, "step": 60, "values": {"INVALID_OR_NOT_SET_TIME": {"disabled": true}}}

Imperial-Guard commented 2 weeks ago

results.json

kingy444 commented 2 weeks ago

Can you go to the integration configuration and select download diagnostics image

Imperial-Guard commented 2 weeks ago

As requested :)

config_entry-electrolux_status-01JA7C3R505Q5BQ7Z44EC1QQHZ (1).json

kingy444 commented 2 weeks ago

which of the time properites is it, i see running, start and end time listed there but the code also looks right at first glance

I assume a negative number is equivalent to a zero, but i cant see anywhere the minimum value shoild be a 1

Imperial-Guard commented 2 weeks ago

Entity is called "aeg_mijn_oven_timetoend"

{ "entity_id": "sensor.aeg_mijn_oven_timetoend", "unique_id": "**REDACTED**", "platform": "electrolux_status", "previous_unique_id": null, "aliases": [], "area_id": null, "categories": {}, "capabilities": null, "config_entry_id": "01JA7C3R505Q5BQ7Z44EC1QQHZ", "created_at": "2024-10-15T05:58:44.179935+00:00", "device_class": null, "device_id": "d535820f86badc7209c22a08105ff8ba", "domain": "sensor", "disabled_by": null, "entity_category": "diagnostic", "hidden_by": null, "icon": null, "id": "d3547bbee12adccbe0ec33a5aeead873", "has_entity_name": true, "labels": [], "modified_at": "2024-10-15T07:06:00.725070+00:00", "name": "Oven Timer", "options": { "sensor.private": { "suggested_unit_of_measurement": "min" }, "conversation": { "should_expose": false }, "sensor": { "suggested_display_precision": 0, "display_precision": 0 } }, "original_device_class": "duration", "original_icon": "mdi:av-timer", "original_name": "Mijn oven time to end", "supported_features": 0, "translation_key": null, "unit_of_measurement": "min", "state": { "entity_id": "sensor.aeg_mijn_oven_timetoend", "state": "1.0", "attributes": { "unit_of_measurement": "min", "device_class": "duration", "icon": "mdi:av-timer", "friendly_name": "Oven Timer" }, "last_changed": "2024-10-15T09:19:11.389645+00:00", "last_reported": "2024-10-15T09:19:11.389645+00:00", "last_updated": "2024-10-15T09:19:11.389645+00:00" } }

kingy444 commented 2 weeks ago

can i get you to patch in this file (overwrite the current copy of sensor.py in custom_components\electrolux_status with the one from the zip below. sensor.zip

Can you then restart HA and enable debug logging for the integration the next time you are using the oven.

I want you to capture the entire period of the timer counting down. I cant see anything obvious that changed that would have this effect.

The only thing i can see that changes here is we no longer call time_seconds_to_minutes for sensors, but that is because we store the value raw in HA and let HA do the conversion https://github.com/albaintor/homeassistant_electrolux_status/pull/61/files#diff-0741a3058c888efde50ed18b364cabcf911725008dde4c0c3fa2af76047e8ff0R61-L50

albaintor commented 2 weeks ago

I fixed this issue in the v1 : this is due to the fact that the API won't notify us when the time reaches 0. At that time, I created a deferred update task when the time reaches <1min left and then manually forced the update to 0 after 1 min : https://github.com/albaintor/homeassistant_electrolux_status/commit/988379691f5a234f462af79759aac7d6b3c5d394

I didn't check the patch in details, is this issue resovled ?

kingy444 commented 2 weeks ago

No this one's not included yet then - strangely I don't recall ever seeing this one when I was refactoring though

Even after forking I kept an eye on what commits were happening

Definitely not something I would strip out intentionally

kingy444 commented 2 weeks ago

shoudl have looked before posting - looks like it was moved in the very next commit https://github.com/albaintor/homeassistant_electrolux_status/commit/e8d643b9369807a423ed77738ce59c874fcdf09b

it was moved from init to coordinator but commented out in coordinator - That explains why i paid no attention to it !!!

albaintor commented 2 weeks ago

OK I brought them back

albaintor commented 2 weeks ago

Should be fixed in https://github.com/albaintor/homeassistant_electrolux_status/tree/v2.0.5