From ac3df8184123a53082195bb3e3fce28880b6c467 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 31 Jul 2024 01:05:09 +0100 Subject: [PATCH] Add esphome-ecodan-hp --- faikin.yaml | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 84 insertions(+), 3 deletions(-) diff --git a/faikin.yaml b/faikin.yaml index ad0754c..d5eeec3 100644 --- a/faikin.yaml +++ b/faikin.yaml @@ -13,22 +13,54 @@ esphome: name: faikin1 esp32: - board: adafruit_feather_esp32s3 - variant: esp32s3 + board: esp32-s3-devkitc-1 framework: type: arduino + version: latest # Enable logging logger: # hardware_uart: USB_SERIAL_JTAG level: DEBUG +ota: + platform: esphome + password: !secret ota_upgrade_pw + external_components: - source: type: local path: ../git/esphome_syslog/components components: [syslog] + - source: github://gekkekoe/esphome-ecodan-hp@main + components: [ ecodan ] + refresh: always + +substitutions: +# heatpump heating/cooling switch +# available modes: HEAT_ROOM_TEMP, HEAT_FLOW_TEMP, HEAT_COMPENSATION_CURVE, COOL_ROOM_TEMP, COOL_FLOW_TEMP + default_heating_switch_mode: HEAT_COMPENSATION_CURVE + default_cooling_switch_mode: COOL_FLOW_TEMP + +packages: + remote_package: + url: https://github.com/gekkekoe/esphome-ecodan-hp/ + ref: main + refresh: always + files: [ + #confs/esp32s3.yaml, # confs/esp32.yaml, for regular board + confs/zone1.yaml, + ## enable if you want to use zone 2 + #confs/zone2.yaml, + ## enable label language file + confs/ecodan-labels-en.yaml, + #confs/ecodan-labels-nl.yaml, + #confs/ecodan-labels-it.yaml, + #confs/server-control.yaml, + #confs/debug.yaml, + ] + wifi: ssid: !secret wifi_ssid password: !secret wifi_pw @@ -49,6 +81,55 @@ light: rmt_channel: 0 chipset: WS2812 name: "RGB LED" - id: rgb_led + id: led restore_mode: ALWAYS_ON rgb_order: GRB + +number: + ## Set led brightness + - platform: template + id: led_brightness + name: ${led_brightness} + icon: mdi:toggle-switch-variant + mode: slider + entity_category: config + optimistic: true + min_value: 0 + max_value: 100 + step: 10 + initial_value: 70 + restore_value: yes + unit_of_measurement: "%" + on_value: + then: + - if: + condition: + - light.is_on: led + then: + - light.turn_on: + id: led + brightness: !lambda |- + // output value must be in range 0 - 1.0 + return id(led_brightness).state / 100.0; + +switch: + - platform: template + id: ecodan_led_switch + name: ${led_switch} + optimistic: true + restore_mode: RESTORE_DEFAULT_ON + lambda: return id(ecodan_led_switch).state; + turn_on_action: + - light.turn_on: + id: led + brightness: !lambda |- + // output value must be in range 0 - 1.0 + return id(led_brightness).state / 100.0; + turn_off_action: + - light.turn_off: + id: led + +ecodan: + id: ecodan_instance + rx_pin: GPIO34 + tx_pin: GPIO48 -- 2.49.0