So I’m trying to add a new automation but when I click on Save I get “Response Error: 500”.
After a fair amount of searching I understand this error typically means
- you’re out of disk space (definitely not my situation)
- your
automations.yamlfile is corrupt - browser cache issues
- system issues resolved by a full reboot.
Well, none of the above apply in my case. But I have been able to reduce this to a specific condition in the automation. If I remove that condition, the automation saves. If I add that condition, I get the Response Error: 500
I also tried clearing the entire automations.yaml file and adding just this automation. No luck, same behaviour.
How weird is that? Here’s the code. The automation is intended to keep two Selects in sync provided that a certain boolean flag is on.
alias: Bar source sync to entertain
description: "When bar source select changes, sync to entertain"
triggers:
- trigger: state
entity_id:
- select.omnilink_bar_source
conditions:
- condition: state
entity_id: input_boolean.sync_bar_and_entertain_audio
state:
- "on"
- condtion: template
value_template: "{{ states('select.omnilink_bar_source') != trigger.to_state.state }}"
actions:
- action: select.select_option
target:
entity_id: select.omnilink_entertain_source
data:
"{{ trigger.to_state.state }}"
mode: single
the culprit appears to be the second condition:
- condtion: template
value_template: "{{ states('select.omnilink_bar_source') != trigger.to_state.state }}"
What gives? If I delete these two lines, the automation saves. If I add them, I don’t get any parsing or syntax errors, but I get “response error: 500” in the web UI.
I could delete this condition, but the condition is intended to prevent an infinite loop from triggering, as I need the sync to run from both sides (bar and entertainment).
Any advice would be appreciated!