From: David Woodhouse Date: Wed, 7 Aug 2024 21:08:58 +0000 (+0100) Subject: Update paper to use base.yaml X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2a49c03a862cd5906e7768c2987afd17e96ef376;p=users%2Fdwmw2%2Fesp32-pool.git Update paper to use base.yaml --- diff --git a/paper.yaml b/paper.yaml index c498c6f..fb0591b 100644 --- a/paper.yaml +++ b/paper.yaml @@ -13,114 +13,39 @@ 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!");