So when Home Mode is on, the Alarm should show as Off. And vice versa.
And when toggling the button it should fire the the according event. Which then toggles that state as well.
However it looks like my scenes don’t get triggered.
Because you have not listened or understood the advice you were given. You are still using the switch turn on/off service to try to control scene entities.
switch:
- platform: template
switches:
alarm:
value_template: "{{ is_state('switch.ix4_300d_home_mode', 'off') }}"
turn_on:
service: scene.turn_on # You must use this service because...
target:
entity_id: scene.afwezig_van_huis # this is a scene.
turn_off:
service: scene.turn_on # You must use this service because...
target:
entity_id: scene.some_other_scene # this is a scene and there is no scene.turn_off service.
You should think about the whole construct, you’re working with.
If I understood it right, you’re using this as some kind of presence detection. If so, I’d use simple input_booleans to reflect your home status. I’m working with a so called residence state:
input_boolean.residence_state_home
input_boolean.residence_state_not_home
and so on
Working with scenes is more complicated in this situation. An input_boolean is on or off, and shows exactly what you need. Everything else can then be worked out in automations, that reference this input_boolean.