Thanks for opening this topic!
I am really struggling with automation debugging as the “Step details” is complete mess for more complex automations from my point of view.
Maybe I do not understand how it works, but here is an example of trace I just got and I am unable to find why the automation did what it did as the trace is total mess for me:
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/0/conditions/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: false
conditions/0/conditions/0/entity_id/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: false
state: Fast
wanted_state: Stop
conditions/1
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/0/entity_id/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
state: 8665
conditions/1/conditions/0/conditions/1
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/1/conditions/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/1/conditions/0/conditions/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/1/conditions/0/conditions/0/entity_id/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
state: 73
conditions/1/conditions/0/conditions/1/conditions/0/conditions/1
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/1/conditions/0/conditions/1/conditions/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/1/conditions/0/conditions/1/conditions/0/entity_id/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
state: 3871
conditions/1/conditions/0/conditions/1/conditions/0/conditions/1/conditions/1
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
conditions/1/conditions/0/conditions/1/conditions/0/conditions/1/conditions/1/entity_id/0
Executed: May 9, 2024 at 12:15:00 PM
Result:
result: true
state: 4033
Here is the condition part of the automation:
conditions:
- alias: Charger Use Mode is not Stop
condition: not
conditions:
- condition: state
entity_id: sensor.solax_evc_charger_use_mode
state: Stop
- condition: or
conditions:
- alias: PV charging + low PV power
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.solax_inverter_power
above: 1500
alias: PV charging
- alias: Home not charged or PV low
condition: or
conditions:
- alias: Home not charged and not enough PV for EV and Home
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.solax_battery_capacity
below: 95
- condition: and
conditions:
- condition: numeric_state
entity_id: sensor.solax_pv_power_total
below: input_number.kona_ev_charging_min_pv
- condition: numeric_state
entity_id: sensor.pv_power_smooth
below: input_number.kona_ev_charging_min_pv
alias: Not enough PV
- alias: Home charged but PV low
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.solax_battery_capacity
above: 95
- alias: Low PV
condition: and
conditions:
- condition: numeric_state
entity_id: input_number.kona_ev_charging_min_pv
value_template: >-
{{ states('input_number.kona_ev_charging_min_pv') |
float * 0.81 }}
above: sensor.pv_power_smooth
alias: PV smooth too low
- condition: numeric_state
entity_id: input_number.kona_ev_charging_min_pv
value_template: >-
{{ states('input_number.kona_ev_charging_min_pv') |
float * 0.81 }}
above: sensor.solax_pv_power_total
alias: PV too low
- alias: Grid charging + min batt or high tariff
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.solax_grid_import
above: 2500
- condition: or
conditions:
- alias: Battery above minimal level (helper)
condition: numeric_state
entity_id: sensor.kona_ev_battery_level
above: input_number.kona_battery_minimal_charge
- condition: state
entity_id: binary_sensor.signal_hdo_tuv_pv
state: 'off'
- condition: numeric_state
entity_id: sensor.solax_battery_capacity
enabled: true
below: 55
Finding which part of the trace corresponds to which part of the automation code is a real nightmare for me. If anyone has an advice how to untangle this I am all ears
So many steps just contain “result: true” without giving any clue to which condition it relates, that it is really hard finding what happened. The only way I am able to sometimes decipher this is thanks to those steps containing returned number. As then I can check the history of all the used variables/sensors and try to guess which one it is based to what value it had at the time of the automation run. It would be much better if the step contained at least the name of the entity if not the condition it is evaluating.