From c4c65ebf340e8a07b82942ba992437cb16d5db3b Mon Sep 17 00:00:00 2001 From: tikismoke Date: Fri, 5 Jan 2024 05:04:26 +0100 Subject: [PATCH 1/3] Update customization.md --- docs/customization.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/customization.md b/docs/customization.md index 94eb9dd..a1aa8a3 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -26,6 +26,7 @@ Table of contents: - [Logger via UART](#logger-via-uart) - [Climate custom presets](#climate-custom-presets) - [Push button / Momentary switch](#push-button--momentary-switch) + - [Control local relay fallback](#Control-local-relay-fallback)     @@ -531,4 +532,21 @@ binary_sensor: switch.turn_on: relay_2 on_release: switch.turn_off: relay_2 -``` \ No newline at end of file +``` + +  +### Control local relay fallback +You can expose the local fallback relay to homeassistant. One use case is with wifi connected light for example. +It can be used to cut the power of the connected light in some case directly from the button. +@tikismoke use it when energy price is higher. An automation change the fallback mode and cut the relay the bulb will no more consume energy in standby mode (but act normally with ligh.toggle from the bluebrint in all other case), local control is cut when power get to normal price. On next push the relay turn `on` and the bulb power up, the next push will call light toggle.toggle from the blueprint directly as it is all already embedded in the esphome yaml code. + +NOTE that in this case the bulb must light `ON` automatically when power is restore. + +```yaml +# Expose relay local control switch to Home Assistant +switch: + - id: !extend relay1_local + internal: false + - id: !extend relay2_local + internal: false +``` From cbb08dc74778e2b82f916e993f6d56ea85f29007 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Fri, 5 Jan 2024 07:20:03 +0100 Subject: [PATCH 2/3] A bit of rewording and adding reference to the issue Solves #1349 --- docs/customization.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index a1aa8a3..aa9eb03 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -26,7 +26,7 @@ Table of contents: - [Logger via UART](#logger-via-uart) - [Climate custom presets](#climate-custom-presets) - [Push button / Momentary switch](#push-button--momentary-switch) - - [Control local relay fallback](#Control-local-relay-fallback) + - [Expose relay fallback switch](#expose-relay-fallback-switch)     @@ -535,12 +535,14 @@ binary_sensor: ```   -### Control local relay fallback -You can expose the local fallback relay to homeassistant. One use case is with wifi connected light for example. -It can be used to cut the power of the connected light in some case directly from the button. -@tikismoke use it when energy price is higher. An automation change the fallback mode and cut the relay the bulb will no more consume energy in standby mode (but act normally with ligh.toggle from the bluebrint in all other case), local control is cut when power get to normal price. On next push the relay turn `on` and the bulb power up, the next push will call light toggle.toggle from the blueprint directly as it is all already embedded in the esphome yaml code. +### Expose Relay Fallback Switch +You can configure a local fallback relay to integrate with Home Assistant. This is particularly useful for devices like WiFi-connected lights. For instance, you can program it to cut the power to a connected light under certain conditions, directly via a switch. -NOTE that in this case the bulb must light `ON` automatically when power is restore. +#### Use Case +One application, as utilized by @tikismoke and detailed in #1349, is in response to fluctuating energy prices. When the energy price is high, an automation can change the fallback mode to cut off the relay. This ensures that the bulb does not consume energy in standby mode. However, it will still function normally with `light.toggle` from the blueprint in all other cases. Local control is reinstated when the power price returns to normal. On the next switch activation, the relay turns `on`, powering up the bulb. Subsequent activations will trigger `light.toggle` from the blueprint, as this functionality is already embedded in the ESPHome YAML code. + +> [!NOTE] +> In this scenario, the bulb must be set to turn `on` automatically when power is restored. ```yaml # Expose relay local control switch to Home Assistant From bc6be104621e07874faba41551a99e98fba09d73 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Fri, 5 Jan 2024 07:32:14 +0100 Subject: [PATCH 3/3] Update ReleaseNotes.md --- ReleaseNotes.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 6eb27e8..cc19557 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -239,6 +239,7 @@ Discover what's next and what we are working on right now in our [Milestones](ht ## Special thanks to: - @bluefoxlee - For the CJK fonts and all the support with #1359. - @Floppe - Fix entity pages labels, #1455 +- @tikismoke - Customization guide: Exposing relay fallback switch to Home Assistant, #1537 ## Previous releases - [v4.1.4 - Support to Home Assistant 2023.12.0](https://github.com/Blackymas/NSPanel_HA_Blueprint/releases/tag/v4.1.4)