Update paper to use base.yaml
authorDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 7 Aug 2024 21:08:58 +0000 (22:08 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Wed, 7 Aug 2024 21:08:58 +0000 (22:08 +0100)
paper.yaml

index c498c6f4482f86df87913c7e44b820b6c2fbea14..fb0591ba7d6c55bcdb78aff18adda35ec5ed29fe 100644 (file)
 
 esphome:
   name: paper
+  on_boot:
+    then:
+      - light.turn_on:
+          id: rgb_led
+          red: 100%
+          green: 0%
+          blue: 0%
 
 esp32:
   board: adafruit_feather_esp32s3
 #  board: esp32-s3-devkitm-1
   variant: esp32s3
   framework:
-    type: arduino
-
-# Enable logging
-logger:
-  level: DEBUG
-
-ota:
-  password: !secret ota_upgrade_pw
-
-external_components:
- - source:
-     type: local
-     path: ../git/esphome_syslog/components
-   components: [syslog]
-
-wifi:
-  ssid: !secret wifi_ssid
-  password: !secret wifi_pw
-
-script:
-    # Publish a value to Domoticz as an nvalue
-  - id: tell_domo_nvalue
-    mode: queued
-    parameters:
-      udevice: int
-      nvalue: int
-    then:
-      lambda: |-
-        id(mqtt_client).publish_json("domoticz/in", [=](JsonObject root) {
-                                                    root["command"] = "udevice";
-                                                    root["idx"] = udevice;
-                                                    root["nvalue"] = nvalue;
-                                                    });
-
-    # Publish a value to Domoticz as an svalue
-  - id: tell_domo_svalue
-    mode: queued
-    parameters:
-      udevice: int
-      svalue: string
-    then:
-      lambda: |-
-        id(mqtt_client).publish_json("domoticz/in", [=](JsonObject root) {
-                                                    root["command"] = "udevice";
-                                                    root["idx"] = udevice;
-                                                    root["svalue"] = svalue;
-                                                    });
-
-    # Publishto Domoticz as nvalue and svalues
-  - id: tell_domo_nsvalues
-    mode: queued
-    parameters:
-      udevice: int
-      nvalue: int
-      svalue: string
-    then:
-      lambda: |-
-        id(mqtt_client).publish_json("domoticz/in", [=](JsonObject root) {
-                                                    root["command"] = "udevice";
-                                                    root["idx"] = udevice;
-                                                    root["nvalue"] = nvalue;
-                                                    root["svalue"] = svalue;
-                                                    });
-
-#  # Enable fallback hotspot (captive portal) in case wifi connection fails
-#  ap:
-#    ssid: "Pool Fallback Hotspot"
-#    password: "JWWHJb38UzxY"
-#
-#  manual_ip: !include poolup.yaml
-#
-#captive_portal:
-
-syslog:
-    ip_address: !secret syslog_ip
+    type: esp-idf
 
-time:
-  - platform: sntp
-    id: sntp_time
-    servers: !secret ntp_servers
-
-
-#network:
-#  enable_ipv6: true
+packages:
+  base: !include base.yaml
 
 mqtt:
-  broker: !secret mqtt_server
-  port: 1884
-  discovery_prefix: ${mqtt_prefix}/homeassistant
-  log_topic: ${mqtt_prefix}/logs
-  username: "pool"
-  password: !secret pool_mqtt_pw
-  id: mqtt_client
   on_connect:
     then:
-      - light.turn_on: rgb_led
-
+      - light.turn_on:
+         id: rgb_led
+         blue: 100%
+         red: 0%
+         green: 0%
   on_disconnect:
     then:
-      - light.turn_off: rgb_led
-
-
+      - light.turn_on:
+         id: rgb_led
+         blue: 0%
+         red: 100%
+         green: 0%
 
 light:
   - platform: esp32_rmt_led_strip
@@ -155,4 +80,4 @@ display:
     update_interval: 30s
 #    full_update_every: 60
     lambda: |-
-      it.print(0, 0, id(font1), "Hello World 7.50inV2 inv!");
+      it.print(0, 0, id(font1), "Hello World 7.50inV2 ESP-IDF inv!");