I am not sure how to trigger what you are attempting, however have you considered using the generic alarm panel and configuring an automation to watch for state changes for your sensors resulting in the gateway emitting an alarm? That is what I have setup. I can post the config if you are interested.
- alias: Trigger alarm while armed away
trigger:
- platform: state
entity_id: sensor.front_door
to: open
- platform: state
entity_id: binary_sensor.door_window_sensor_158d0001bb334e
to: 'on'
- platform: state
entity_id: binary_sensor.living_motion_12
to: 'on'
- platform: state
entity_id: binary_sensor.sitting_motion_16
to: 'on'
- platform: state
entity_id: binary_sensor.garage_motion_13
to: 'on'
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.home_alarm
id: e69ccae17b5246edbe00670528186556
- alias: Trigger alarm while armed home
trigger:
- platform: state
entity_id: sensor.front_door
to: open
- platform: state
entity_id: binary_sensor.door_window_sensor_158d0001bb334e
to: 'on'
- platform: state
entity_id: binary_sensor.garage_motion_13
to: 'on'
condition:
- condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_home
action:
service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.home_alarm
id: 0399e928e2e24c77bcb64df35060d88a
- alias: Send notification when alarm triggered
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: triggered
action:
- service: xiaomi_aqara.play_ringtone
data:
gw_mac: 7811dcb9e148
ringtone_id: 0
- service: tts.google_say
entity_id: media_player.home_group
data:
message: ALARM ALARM ALARM.
- service: notify.Pushbullet
data:
message: The Alarm has been set off