Home-Assistant-DIY/参考文档(1-10)/example_7_4_1.yaml

29 lines
630 B
YAML

# example_7_4_1.yaml
remote:
- platform: xiaomi_miio
name: xiaomi_rm
host: x.x.x.x
token: xxxxxxxxxxxxxxxxxx
commands:
tv_power:
command:
- raw:xxxxxxxxxxxxxxxxxxxxxxxx
tv_input:
command: raw:xxxxxxxxxxxxxxxxxx
script:
tv_power:
alias: 电视开关
sequence:
- service: remote.send_command
entity_id: 'remote.xiaomi_rm'
data:
command: 'tv_power'
tv_input:
alias: 输入源切换
sequence:
- service: remote.send_command
entity_id: 'remote.xiaomi_rm'
data:
command:
- 'tv_input'