Hi all
I am truly stumped. I’m setting up an button like I’ve done before many times but the automations will just not run. I’ve done the most simple one of toggling a light and I can see it’s being triggered (both in logbook and by the “Triggered” bar that flashes up in the UI, but nothing happens. Traces don’t show anything (assuming since no actions were run). I’ve checked my other automations and they run fine but still won’t when adding the button as another trigger (although still showing that it is triggered). I’ve tried with 2 different buttons now with same behaviour and also added the working button to the test automation but it also won’t run the action. I checked the action by clicking “run” and it works fine.
What have I stuffed up? Below is my code.
alias: test Automation
description: ""
triggers:
- trigger: state
entity_id:
- sensor.button_main_bedroom_carrie_action
to: single
conditions: []
actions:
- action: light.toggle
target:
entity_id: light.group_lights_dining_room
data: {}
mode: single
The test with clicking run makes sure that the action part is correct, so your issue is in the trigger part.
Is the name correct?
Is the state value correct?
Use the developer tools to check
Yes, name is correct and States in the developer tools will show the “single” state when pressed.
But the automation is showing as triggered as in pic below. Surely that would mean that the trigger is fine and that the automation has been triggered now?
Ok, found the problem. There was a typo in configuration.yaml that I missed and didn’t follow the process as I was in a rush when making the change, so didn’t check configuration. Only found out when deciding to do a full restart and the system didn’t come up properly. Fixed and all working now. Strange behaviour though. I would have thought I’d get an error or the whole system would fall over. But just for actions on new automations to not work is weird. Anyway, just glad it’s working again and thanks for the helping suggestions.