If I set the alarm_control_panel.alarm to armed_away it works fine. Both alarms are set to armed_away
If I set the alarm_control_panel.alarm to armed_home it briefly shows that status and then jumps to armed_away
If I set the alarm_control_panel.alarm to armed_night it briefly shows that status and then jumps to armed_away
It appears that the services are being called without passing along the entity_id since it shows the same behavior if I use the services dev tool and call that service (without any data).
I have tried swapping entity_id and service_template but this doesn’t seem to help.
That behavior is also seen when the entity expects to receive an acknowledgement from the device, in response to a command, but doesn’t get it. For example, if a light is turned on and it expects to receive a confirmation from the device that it is, in fact, on but fails to receive it, the light’s state is automatically reverted to off.
Which alarm_control_panel platform are you using?
BTW, I don’t think it’ll make a difference but in your service_template you can get the to_state directly without having to query the entity for its state.
Turns out there was another automation tucked away that caused the switching. If I disable that one and trigger the Service call it works fine. Seems I have to go back to the drawing board on this one. Thanks for your help!