From: David Woodhouse <dwmw@amazon.co.uk> Date: Wed, 7 Aug 2024 15:16:52 +0000 (+0100) Subject: Use base package for softener X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=80b0700d037b7053e662b2caf7563a3554ab6b88;p=users%2Fdwmw2%2Fesp32-pool.git Use base package for softener --- diff --git a/softener.yaml b/softener.yaml index 8e64379..e710bed 100644 --- a/softener.yaml +++ b/softener.yaml @@ -25,104 +25,17 @@ esp32: version: 5.0.2 platform_version: 6.3.2 -# Enable logging -logger: - level: DEBUG - -ota: - platform: esphome - password: !secret ota_upgrade_pw - -external_components: - - source: - type: local - path: ../git/esphome_syslog/components - components: [syslog] +packages: + base: !include base.yaml wifi: - power_save_mode: none networks: - ssid: !secret wifi_ssid password: !secret wifi_pw bssid: !secret wndr3800_bssid priority: 1 - - 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_ipv6 - -time: - - platform: sntp - id: sntp_time - servers: !secret ntp_servers - - -network: - enable_ipv6: true 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: @@ -138,16 +51,6 @@ mqtt: red: 100% green: 0% - on_json_message: - - topic: domoticz/out - then: - - lambda: |- - int idx = x["idx"]; - int nvalue = x["nvalue"].as<int>(); - - // ESP_LOGD("on_json_message", x["name"]); - - light: #G35=RGB WS2812C-2020 - platform: esp32_rmt_led_strip