Newer
Older
homeassistant_config / esphome / wavin9000.yaml
esphome:
  name: wavin9000

esp32:
  board: nodemcu-32s
  framework:
    type: esp-idf

external_components:
  - source: github://dkgof/esphome_wavinahc9000v3
    components: [wavin_ahc9000]

logger:
  level: INFO
  logs:
    wavin_ahc9000: INFO

uart:
  id: uart_wavin
  tx_pin: GPIO17
  rx_pin: GPIO16
  baud_rate: 38400
  stop_bits: 1
  parity: NONE

wavin_ahc9000:
  id: wavin
  uart_id: uart_wavin
  #update_interval: 5s
  poll_channels_per_cycle: 8
  update_interval: 2s
  channel_01_friendly_name: "Bryggers"
  channel_02_friendly_name: "Jens Værelse"
  channel_03_friendly_name: "Gang"
  channel_04_friendly_name: "Niels Værelse"
  channel_05_friendly_name: "Køkken"
  channel_07_friendly_name: "Kontor"
  channel_08_friendly_name: "Soveværelse"
  channel_09_friendly_name: "Stue"
  channel_10_friendly_name: "Stort Badeværelse"
  channel_11_friendly_name: "Lille Badeværelse"
#packages:
#  wavin_tools:
#    url: https://github.com/heinekmadsen/esphome_wavinahc9000v3
#    files:
#      - packages/yaml_generator.yaml
#    refresh: 0s

# Optional readiness indicator (turns on when discovery stable)
#binary_sensor:
#  - platform: wavin_ahc9000
#    wavin_ahc9000_id: wavin
#    type: yaml_ready
#    name: "Wavin YAML Ready"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

api:

ota:
  platform: esphome
  password: "78e75f9b6126ee57de681fd33aeba979"

climate:

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Bryggers"
    channel: 1
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Jens Værelse"
    channel: 2

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Gang"
    channel: 3
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Niels Værelse"
    channel: 4

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Køkken"
    channel: 5

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Kontor"
    channel: 7
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Soveværelse"
    channel: 8

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Stue"
    channel: 9
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Stort Badeværelse"
    channel: 10

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Lille Badeværelse"
    channel: 11



  # Group climates

  #- platform: wavin_ahc9000
  #  wavin_ahc9000_id: wavin
  #  name: "Zone G 5&6"
  #  members: [5, 6]



sensor:

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Bryggers Battery"
    channel: 1
    type: battery
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Jens Værelse Battery"
    channel: 2
    type: battery

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Gang Battery"
    channel: 3
    type: battery
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Niels Værelse Battery"
    channel: 4
    type: battery

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Køkken Battery"
    channel: 5
    type: battery

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Kontor Battery"
    channel: 7
    type: battery
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Soveværelse Battery"
    channel: 8
    type: battery

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Stue Battery"
    channel: 9
    type: battery
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Stort Badeværelse Battery"
    channel: 10
    type: battery

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Lille Badeværelse Battery"
    channel: 11
    type: battery


  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Bryggers Temperature"
    channel: 1
    type: temperature
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Jens Værelse Temperature"
    channel: 2
    type: temperature

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Gang Temperature"
    channel: 3
    type: temperature
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Niels Værelse Temperature"
    channel: 4
    type: temperature

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Køkken Temperature"
    channel: 5
    type: temperature

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Kontor Temperature"
    channel: 7
    type: temperature
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Soveværelse Temperature"
    channel: 8
    type: temperature

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Stue Temperature"
    channel: 9
    type: temperature
  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Stort Badeværelse Temperature"
    channel: 10
    type: temperature

  - platform: wavin_ahc9000
    wavin_ahc9000_id: wavin
    name: "Lille Badeværelse Temperature"
    channel: 11
    type: temperature

binary_sensor:
  - platform: template
    name: "Bryggers Varme Aktiv"
    lambda: |-
      if (id(channel_1_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat
  - platform: template
    name: "Jens Værelse Varme Aktiv"
    lambda: |-
      if (id(channel_2_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat
  - platform: template
    name: "Gang Varme Aktiv"
    lambda: |-
      if (id(channel_3_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat
  - platform: template
    name: "Niels Værelse Varme Aktiv"
    lambda: |-
      if (id(channel_4_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat    
  - platform: template
    name: "Køkken Varme Aktiv"
    lambda: |-
      if (id(channel_5_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat

  - platform: template
    name: "Kontor Varme Aktiv"
    lambda: |-
      if (id(channel_7_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat
  - platform: template
    name: "Soveværelse Varme Aktiv"
    lambda: |-
      if (id(channel_8_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat
  - platform: template
    name: "Stue Varme Aktiv"
    lambda: |-
      if (id(channel_9_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat
  - platform: template
    name: "Stort Badeværelse Varme Aktiv"
    lambda: |-
      if (id(channel_10_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat
  - platform: template
    name: "Lille Badeværelse Varme Aktiv"
    lambda: |-
      if (id(channel_11_hvac_action).state == "heating") {
        // Climate enheden varmer
        return true;
      } else {
        // Climate enheden er idle, off, cooling osv.
        return false;
      }
    device_class: heat

text_sensor:
  - platform: homeassistant
    entity_id: climate.wavin9000_bryggers
    attribute: hvac_action
    id: channel_1_hvac_action
  - platform: homeassistant
    entity_id: climate.wavin9000_jens_vaerelse
    attribute: hvac_action
    id: channel_2_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_gang
    attribute: hvac_action
    id: channel_3_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_niels_vaerelse
    attribute: hvac_action
    id: channel_4_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_kokken
    attribute: hvac_action
    id: channel_5_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_kontor
    attribute: hvac_action
    id: channel_7_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_sovevaerelse
    attribute: hvac_action
    id: channel_8_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_stue
    attribute: hvac_action
    id: channel_9_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_stort_badevaerelse
    attribute: hvac_action
    id: channel_10_hvac_action    
  - platform: homeassistant
    entity_id: climate.wavin9000_lille_badevaerelse
    attribute: hvac_action
    id: channel_11_hvac_action