티스토리 뷰

HOME ASSISTANT

HomeAssistant scripts 설정

choi88 2020. 11. 3. 09:41

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
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
more
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
글 보관함