input_boolean:
amplituner:
name: test
inital: off
第二步是在scripts.yaml填入以下資訊
sequence:
door open:
sequence:
- service: remote.send_command
entity_id remote.xiaomi_miio_192_168_31_xxx
data
command:
- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
第三步是在automations.yaml
turn_amplituner_on:
trigger:
platform: state
enitity_id: amplituner
from: off
to: on
action:
service: script.door open
entity_id: script.amplituner_on