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:
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