TS0215A / Nedis SmartLife Remote Control automation

Button assignment and automation for TS0215A / Nedis SmartLife Remote Control
TS0215A

Button assignment:
upper left = emergency
upper right = arm_all_zones
bottom left = arm_day_zones
bottom right = disarm

automation:


alias: automation_TS0215A_remote
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.TS0215A_remote_action
condition: []
action:
  - if:
      - condition: template
        value_template: >-
          {{ states('sensor.TS0215A_remote_action') | string ==
          "emergency" | string }}
    then:
      - service: notify.mobile_app_xxxx
        metadata: {}
        data:
          message: upper_left
  - if:
      - condition: template
        value_template: >-
          {{ states('sensor.TS0215A_remote_action') | string == "disarm"
          | string }}
    then:
      - service: notify.mobile_app_xxxx
        metadata: {}
        data:
          message: bottom_right
    enabled: true
  - if:
      - condition: template
        value_template: >-
          {{ states('sensor.TS0215A_remote_action') | string ==
          "arm_all_zones" | string }}
    then:
      - service: notify.mobile_app_xxxx
        metadata: {}
        data:
          message: upper_right
  - if:
      - condition: template
        value_template: >-
          {{ states('sensor.TS0215A_remote_action') | string ==
          "arm_day_zones" | string }}
    then:
      - service: notify.mobile_app_xxxx
        metadata: {}
        data:
          message: bottom_left
mode: single