나비엔 보일러 난방 자동화

 
작년부터 스마트싱스에 나비엔 보일러가 클라우드로 연결됨에 따라 HA에도 난방 자동화를 만들어 써왔습니다.

네이버날씨 내일 최저기온에 맞춰 1시간, 1시간 30분, 2시간, 2시간 30분, 3시간, 4시간, 8시간 패턴으로 10분 반복난방을 만들었고요. 주간 난방은 네이버날씨 오늘 최고기온에 맞춰 만들었습니다.

최근 자동화의 액션 부분을 스크립트로 빼서 자동화는 처음 시작 시간만 트리거하고 액션은 스크립트로 만들어 해당 스크립트 on/off에 따라 대시보드의 난방카드에 색깔로 표시되도록 했는데 시인성이 좋네요.

스크립트는 타임패턴으로 만들지 않고 가동과 시간 delay를 반복해 나열하고 새벽시간에는 좀 더 가동되도록 해 코드가 많이 난잡해졌습니다.

- alias: boiler-night_repeat
  trigger:
  - at: '18:00'
    platform: time
  action:
    - choose:
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          below: '-4.5'
        sequence:
          - service: script.boiler_1hours_repeat
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          above: '-4.5'
          below: '-2.5'
        sequence:
          - service: script.boiler_15hours_repeat
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          above: '-2.5'
          below: '-0.5'
        sequence:
          - service: script.boiler_2hours_repeat
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          above: '-0.5'
          below: '2.5'
        sequence:
          - service: script.boiler_25hours_repeat
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          above: '2.5'
          below: '5.5'
        sequence:
          - service: script.boiler_3hours_repeat
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          above: '5.5'
          below: '9.5'
        sequence:
          - service: script.boiler_4hours_repeat
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          above: '9.5'
          below: '12.5'
        sequence:
          - service: script.boiler_8hours_repeat
      - conditions:
        - condition: numeric_state
          entity_id: sensor.naver_weather_tomorrowmtemp
          above: '12.5'
          below: '15.5'
        sequence:
          - delay: "10:00:00"
          - service: script.boiler_10min_once
  mode: single

참고: 나비엔 보일러 난방 자동화 2차