코딩정보


●HA작업) 스위치 연동 방법 블루프린트와 자동화 방법




컨텐츠 정보


본문

HA작업) 스위치 연동 방법 블루프린트와 자동화 방법
3232235521_1705899352.4423.png
전체 재부팅후
스위치 동기화_pc_switching_pc_pci_상태 알 수 없는 서비스를 사용합니다.
===========
자동화 "스위치 동기화_pc_switching_pc_pci_상태 " (automation.seuwici_donggihwa_pc_switching_pc_pci_sangtae')에는 알 수 없는 서비스 switch.turn_unknown'를 호출하는 작업이 있습니다.

이 오류로 인해 자동화가 제대로 실행되지 않습니다. 이 서비스를 더 이상 사용할 수 없거나 오타로 인해 서비스가 발생했을 수 있습니다.

이 오류를 해결하려면 edit the automation을 수행하고 이 서비스를 호출하는 작업을 제거합니다.
==============

문제 발생


예) A 스위치 ON/OFF 하면 다른 다른 스위치 ON/OFF 를 설정 

블루 프린트 사용시 재부팅또는 인식문제의 로그 발생 하여 자동화로 대치 변경 합니다.
    switch_A: switch.wifi_switch_1ch_socket_1
    switch_B: switch.cb1lu_0729_switch_1
=============
automation:
  - alias: Switch A ON triggers Switch B ON
    trigger:
      platform: state
      entity_id: switch.cb1lu_0729_switch_1
      to: 'on'
    action:
      service: switch.turn_on
      entity_id: switch.wifi_switch_1ch_socket_1
  - alias: Switch A OFF triggers Switch B OFF
    trigger:
      platform: state
      entity_id: switch.cb1lu_0729_switch_1
      to: 'off'
    action:
      service: switch.turn_off
      entity_id: switch.wifi_switch_1ch_socket_1
  
======================
alias: 스위치 동기화_tuya엘베와현관엘베콜
description: 릴레이 tuya 현관엘베콜 동기화
use_blueprint:
  path: clipman/switch_sync.yaml
  input:
    switch_A: switch.0xa4c13844c6aeb0f8_right
    switch_B: switch.1_433_switch_1
==================================
    alias: on_off 앨베콜ON triggers tuya_엘베_relay ON
    trigger:
      platform: state
      entity_id: switch.0xa4c13844c6aeb0f8_right
      to: 'on'
    action:
      service: switch.turn_on
      entity_id: switch.1_433_switch_1
    alias: on_off 앨베콜Off triggers tuya_엘베_relay Off
    trigger:
      platform: state
      entity_id: switch.0xa4c13844c6aeb0f8_right
      to: 'off'
    action:
      service: switch.turn_off
      entity_id: switch.1_433_switch_1
===============
alias: 스위치 동기화_모니터_모니터sw
description: ""
use_blueprint:
  path: clipman/switch_sync.yaml
  input:
    switch_A: switch.0xa4c1386ecad47eaa_center
    switch_B: switch.cb1lu_0729_switch_1
=====================
alias: on_off 서재불2_ON triggers 모니터sw_ON
trigger:
  platform: state
  entity_id: switch.0xa4c1386ecad47eaa_center
  to: 'on'
action:
  service: switch.turn_on
  entity_id: switch.cb1lu_0729_switch_1
alias: on_off 서재불2_Off triggers 모니터sw_Off
trigger:
  platform: state
  entity_id: switch.0xa4c1386ecad47eaa_center
  to: 'off'
action:
  service: switch.turn_off
  entity_id: switch.cb1lu_0729_switch_1
==============   
alias: 스위치 동기화_pc_switching_pc_pci_상태
description: ""
use_blueprint:
  path: clipman/switch_sync.yaml
  input:
    switch_A: switch.0xa4c1386ecad47eaa_right
    switch_B: switch.pc_socket_1
==================
alias: on_off 서재불3_ON triggers pc_pci_sw_ON
trigger:
  platform: state
  entity_id: switch.0xa4c1386ecad47eaa_right
  to: 'on'
action:
  service: switch.turn_on
  entity_id: switch.pc_socket_1
alias: on_off 서재불3_Off triggers pc_pci_sw_Off
trigger:
  platform: state
  entity_id: switch.0xa4c1386ecad47eaa_right
  to: 'off'
action:
  service: switch.turn_off
  entity_id: switch.pc_socket_1

==============

문제는 on 상태 확인에서 off에서 on 동작시로 변경

========== 최종 =======
해결 방법은

   reboot_delay: '3'

를 추가합니다

1,2,분 테스트 진행 적용 해보니

해결 안되고

============

alias: 스위치 동기화_모니터_모니터sw
description: 블루프린트 설정작업
use_blueprint:
  path: clipman/switch_sync.yaml
  input:
    switch_A: switch.0xa4c1386ecad47eaa_center
    switch_B: switch.cb1lu_0729_switch_1
    reboot_delay: "1"
===============1

automation:
  - alias: Switch A ON triggers Switch B ON
    trigger:
      platform: state
      entity_id: switch.0xa4c1386ecad47eaa_center
      from: 'off'
      to: 'on'
    action:
      service: switch.turn_on
      entity_id: switch.cb1lu_0729_switch_1
  - alias: Switch A OFF triggers Switch B OFF
    trigger:
      platform: state
      entity_id: switch.0xa4c1386ecad47eaa_center
      from: 'on'
      to: 'off'
    action:
      service: switch.turn_off
      entity_id: switch.cb1lu_0729_switch_1
=========== 2
    alias: 서제불Switch2 A ON triggers 모니터Switch B ON
    trigger:
      platform: state
      entity_id: switch.0xa4c1386ecad47eaa_center
      from: 'off'
      to: 'on'
    action:
      service: switch.turn_on
      entity_id: switch.cb1lu_0729_switch_1
    alias: 서제불Switch2 A OFF triggers 모니터Switch B OFF
    trigger:
      platform: state
      entity_id: switch.0xa4c1386ecad47eaa_center
      from: 'on'
      to: 'off'
    action:
      service: switch.turn_off
      entity_id: switch.cb1lu_0729_switch_1
  ====================
☞ https://11q.kr 에 등록된 자료 입니다. ♠ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다♠1.png
뷰PDF add1,add2



관련자료

댓글 0
등록된 댓글이 없습니다.



♥간단_메모글♥


최근글


새댓글



PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
▶ 2024-05-17 17:41:35

오늘의 홈 현황


  • 현재 접속자♨ 103 명
  • 오늘 가입자※ 1 명
  • 어제 가입자※ 6 명
  • 주간 가입자※ 11 명
  • 오늘 방문자 1,219 명
  • 어제 방문자 2,015 명
  • 최대 방문자 13,042 명
  • 전체 방문자 4,327,564 명
  • 전체 게시물※ 8,573 개
  • 전체 댓글수※ 24,619 개
  • 전체 회원수 10,971 명

QR코드


☞ QR코드 스캔은 kakao앱 자체 QR코드

알림 0








최신글↑