From a73002a9028c44898814b48c67bca1e05127aed7 Mon Sep 17 00:00:00 2001 From: ESPHome Device Builder Date: Sun, 26 Jul 2026 17:36:20 +1200 Subject: [PATCH] Edit esp-bedrm1arlecbulb.yaml --- esphome/esp-bedrm1arlecbulb.yaml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/esphome/esp-bedrm1arlecbulb.yaml b/esphome/esp-bedrm1arlecbulb.yaml index 6414f22..0fd1217 100644 --- a/esphome/esp-bedrm1arlecbulb.yaml +++ b/esphome/esp-bedrm1arlecbulb.yaml @@ -6,6 +6,7 @@ # https://home.fox.co.nz/gitea/zorruno/zorruno-homeassistant/src/branch/master/esphome/esp-bedrm1arlecbulb.yaml #:########################################################################################:# # VERSIONS: +# v1.5 2026-07-26 Republish retained MQTT status whenever the broker reconnects # v1.4 2026-07-25 Standardized MQTT payloads: "ON"/"OFF" → "On"/"Off" # v1.3 2026-07-20 Simplified local MQTT command and status topics to the device root # v1.2 2026-02-25 Updated yaml to zorruno layout V1.1 @@ -57,7 +58,7 @@ substitutions: # Project Naming project_name: "Grid Connect GLD120HA RGBWW.Arlec" - project_version: "v1.4" + project_version: "v1.5" # Passwords & Secrets (Unfortunately, you can't use substitutions inside secret names) # Re-using your existing bulb flasher secrets (adjust if you prefer per-device secrets) @@ -301,6 +302,16 @@ logger: # MQTT COMMANDS (adds device-specific triggers to common MQTT) #:########################################################################################:# mqtt: + on_connect: + then: + - mqtt.publish: + topic: "${mqtt_local_status_topic}" + payload: !lambda |- + return id(bulb_light).current_values.is_on() + ? "${mqtt_local_device_command_ON}" + : "${mqtt_local_device_command_OFF}"; + retain: true + on_message: - topic: "${mqtt_local_command_topic}" payload: "${mqtt_local_device_command_ON}"