Edit esp-breakfastbarleds.yaml

This commit is contained in:
ESPHome Device Builder
2026-07-26 17:36:20 +12:00
parent a73002a902
commit b216190c98
+12 -1
View File
@@ -6,6 +6,7 @@
# https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-breakfastbarleds.yaml # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-breakfastbarleds.yaml
#:########################################################################################:# #:########################################################################################:#
# VERSIONS: # VERSIONS:
# V2.3 2026-07-26 Republish retained MQTT status whenever the broker reconnects
# V2.2 2026-07-25 Standardized MQTT payloads: "ON"/"OFF" → "On"/"Off" # V2.2 2026-07-25 Standardized MQTT payloads: "ON"/"OFF" → "On"/"Off"
# V2.1 2026-07-20 Simplified local MQTT command and status topics to the device root # V2.1 2026-07-20 Simplified local MQTT command and status topics to the device root
# V2.0 2025-09-15 A bunch of fixes and made it more standard across my devices # V2.0 2025-09-15 A bunch of fixes and made it more standard across my devices
@@ -82,7 +83,7 @@ substitutions:
# Project Naming # Project Naming
project_name: "Magichome Single Colour V1.1 LED Controller.Generic ESP8266" # Manufacturer before the dot, device after the dot. project_name: "Magichome Single Colour V1.1 LED Controller.Generic ESP8266" # Manufacturer before the dot, device after the dot.
project_version: "v2.2" # Project version denotes release of the YAML file, allowing checking of deployed vs latest version project_version: "v2.3" # Project version denotes release of the YAML file, allowing checking of deployed vs latest version
# Passwords & Secrets (Unfortunately, you can't use substitutions inside secret names) # Passwords & Secrets (Unfortunately, you can't use substitutions inside secret names)
api_key: !secret esp-api_key api_key: !secret esp-api_key
@@ -344,6 +345,16 @@ status_led:
# This adds device-specific MQTT command triggers to the common MQTT configuration. # This adds device-specific MQTT command triggers to the common MQTT configuration.
#:########################################################################################:# #:########################################################################################:#
mqtt: mqtt:
on_connect:
then:
- mqtt.publish:
topic: "${mqtt_local_status_topic}"
payload: !lambda |-
return id(mosfet_leds).current_values.is_on()
? "${mqtt_local_device_command_ON}"
: "${mqtt_local_device_command_OFF}";
retain: true
on_message: on_message:
# Light control to ramp up # Light control to ramp up
- topic: "${mqtt_local_command_topic}" - topic: "${mqtt_local_command_topic}"