티스토리 뷰
Automation의 경우 trigger 조건이 있어야 실행 가능하지만 scripts는 trigger 조건 없이 실행 가능하다
Automation의 actiomn에서도 script를 사용 가능하기 때문에 자주 쓰는 조건들을 package 해서 사용 할 수도 있다
필자의 경우 구글어시스턴트 영화 모드로 사용하기 위해 작성한 scripts이다
script:
'16044122xxxx':
alias: projector on
sequence:
- service: remote.send_command
entity_id: remote.xiaomi_miio_xxxx
data:
command:
- Z6VLAC8CAACCBgAAqggAAGcRAAABIwAAZK8AAJx2AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAEAAAAAAQEAAAEAAAABAQEAAAAAAQAAAAxxxxxxx
- type: turn_off
device_id: a64e561818fa11eb9b40b7456df17ac8
entity_id: switch.wall_switch_d5e2
domain: switch
mode: single
'1604412xxxxx':
alias: projector off
sequence:
- service: remote.send_command
entity_id: remote.xiaomi_miio_xxxxx
data:
command:
- Z6VLAC8CAACCBgAAqggAAGcRAAABIwAAZK8AAJx2AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAEAAAAAAQEAAAEAAAABAQEAAAAAAQAAAxxxxxxxx
- delay: '1'
- service: remote.send_command
entity_id: remote.xiaomi_miio_xxxxx
data:
command:
- Z6VLAC8CAACCBgAAqggAAGcRAAABIwAAZK8AAJx2AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAAEAAAAAAQEAAAEAAAABAQEAAAAAAQAAAAEBxxxxxxx
- type: turn_on
device_id: a64e561818fa11eb9b40b7456xxxx
entity_id: switch.wall_switch_dxxx
domain: switch
mode: single
'HOME ASSISTANT' 카테고리의 다른 글
Xiaomi Gatway Token (0) | 2020.11.03 |
---|---|
SmartThinq Component Token (0) | 2020.11.03 |
homeAssistant Configuration 설정 (0) | 2020.11.03 |
HomeAssistant Automation 설정 (0) | 2020.11.02 |
HomeAssistant 기본 설명 (0) | 2020.11.02 |