Xiaomi gateway alarm service?

i connected the Xiaomi gateway and i want to set this automation:

When the gateway activate alaram (based on the logic i set in the MiHome app)
send a HTTP call to Twilio.

Is it possible?


take a look at Arm/disarm Xiaomi Gateway alarm

1 Like

Thanks! I’ll try it.

Hi All,
I think my problem is linked to the same subject.
I try to set up an automation to activate siren and light when my one of the sensors are opened and the alarm_control_panel is arm_home or arm_away.

when i run the automation, it works perfectly, However, when i arm the alarm_control_panel and i opened the door sensor, the automation is not run!!

I didn’t see the issue in this code :confused:
Any ideas? Thanks

this is the Yaml code :

alias: Trigger Alarm Home
description: ''
  - type: opened
    platform: device
    device_id: d7a57f8c067970235d9db7e0670bca49
    entity_id: binary_sensor.door_window_sensor_158d00040221a9
    domain: binary_sensor
      hours: 0
      minutes: 0
      seconds: 1
      milliseconds: 0
  - condition: state
    entity_id: alarm_control_panel.home_alarm
    state: arm_home
  - type: turn_on
    device_id: a8b6708062ba2a1015dc8a183a9dfd9b
    entity_id: light.mi_hub_light
    domain: light
  - service: notify.mobile_app_sm_g780f
      message: Alarme déclenchée!! intrus!
  - service: script.script_alarm
mode: single


Are you using the out of the box MIIO integration?

Xiaomi Miio - Home Assistant suggests the state should be armed_away - there doesn’t seem to be a arm_home