From 6343e6eb4ab83dc80a71b9abf5433a2889cd2d43 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:21:32 +0100 Subject: [PATCH] Restore light state on boot Trying to solve #47 --- ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml | 5 +++++ ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_relays.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml b/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml index a044bb5..90d8fb2 100644 --- a/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml +++ b/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_leds.yaml @@ -44,6 +44,7 @@ light: # method: esp32_rmt num_leds: 32 pin: GPIO13 + restore_mode: RESTORE_DEFAULT_OFF # Those lights are available based on the model selections - &light_partition_with_effects @@ -52,6 +53,7 @@ light: platform: partition default_transition_length: ${default_transition_length} internal: true + restore_mode: RESTORE_DEFAULT_OFF effects: - addressable_rainbow: name: "Rainbow" @@ -184,6 +186,8 @@ light: platform: partition disabled_by_default: true default_transition_length: ${default_transition_length} + restore_mode: RESTORE_DEFAULT_OFF + segments: - id: light_full from: 0 @@ -417,6 +421,7 @@ light: platform: partition internal: true default_transition_length: ${default_transition_length} + restore_mode: RESTORE_DEFAULT_OFF segments: - id: light_full from: 9 diff --git a/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_relays.yaml b/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_relays.yaml index dc1bce0..91ca3a1 100644 --- a/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_relays.yaml +++ b/ESPHome/TX-Ultimate-Easy-ESPHome_core_hw_relays.yaml @@ -29,6 +29,7 @@ light: output: output_relay_1 platform: binary internal: true + restore_mode: RESTORE_DEFAULT_OFF on_turn_on: then: - if: