]> www.infradead.org Git - users/dwmw2/esp32-pool.git/commitdiff
Add esphome-ecodan-hp
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 31 Jul 2024 00:05:09 +0000 (01:05 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 31 Jul 2024 00:05:09 +0000 (01:05 +0100)
faikin.yaml

index ad0754cdd4469f42149bf502973ce3d0dfb0ed15..d5eeec381cda8c4a1e439805d18127a24eb6fa22 100644 (file)
@@ -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