From 9a8ff1159b4e2a140cfa635ea9cb34f693b1a1e5 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Sat, 6 Jan 2024 00:44:29 +0100 Subject: [PATCH] Standardize heater_relay on docs Solves #1541 --- docs/addon_climate.md | 145 ++++++++++++++++++++++++++++-------------- docs/alarm.md | 32 ++++++---- docs/blueprint.md | 5 +- docs/customization.md | 130 ++++++++++++++++++++++--------------- docs/install.md | 2 +- docs/tft_upload.md | 1 + 6 files changed, 201 insertions(+), 114 deletions(-) diff --git a/docs/addon_climate.md b/docs/addon_climate.md index 2aaadfe..2f23eab 100644 --- a/docs/addon_climate.md +++ b/docs/addon_climate.md @@ -1,6 +1,7 @@ # Add-on: Climate ## Description + This add-on enables the use of your panel's relays to act as a thermostat (either cooler or heater) using the internal temperature sensor and independent of the network availability. ### Attention @@ -11,44 +12,46 @@ This add-on enables the use of your panel's relays to act as a thermostat (eithe 2. A target temperature must be set on the climate entity in Home Assistant or the page Climate in your panel. -  ## Installation + You will need to add the reference to `addon_climate_heat`, `addon_climate_cool` or `addon_climate_dual` files on your ESPHome settings in the `package` section and after the `remote_package` (base code), as shown bellow (for `heat` in this example): ```yaml substitutions: - ###### CHANGE ME START ###### + # Settings - Editable values device_name: "YOUR_NSPANEL_NAME" wifi_ssid: !secret wifi_ssid wifi_password: !secret wifi_password - nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft" - nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft" - - ##### addon-configuration ##### - ## addon_climate ## - heater_relay: "1" # possible values: 1/2 - - ##### CHANGE ME END ##### + nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft" + + # Add-on configuration (if needed) + ## Add-on climate + heater_relay: "1" # Possible values: "1" or "2" +# Customization area +##### My customization - Start ##### +##### My customization - End ##### +# Core and optional configurations packages: remote_package: url: https://github.com/Blackymas/NSPanel_HA_Blueprint ref: main files: - nspanel_esphome.yaml # Core package - # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control - - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control - # - nspanel_esphome_addon_climate_dual.yaml # activate for local climate (dual) control + # Optional advanced and add-on configurations + # - advanced/esphome/nspanel_esphome_advanced.yaml + # - nspanel_esphome_addon_climate_cool.yaml + - nspanel_esphome_addon_climate_heat.yaml + # - nspanel_esphome_addon_climate_dual.yaml refresh: 300s esp32: framework: type: esp-idf - ``` -  + ## Configuration The following keys are available to be used in your `substitutions`: @@ -70,40 +73,43 @@ temp_step|Optional|Number representing a temperature in the selected unit|`0.5`| - All values must be delimited with `""` - For more details on the keys, please take a look at [ESPHome Base Climate Configurations](https://esphome.io/components/climate/index.html#base-climate-configuration) and [ESPHome Climate Thermostat - Additional actions behavior](https://esphome.io/components/climate/thermostat.html#additional-actions-behavior). -  -### Examples: +### Examples -#### Cooler: +#### Cooler ```yaml substitutions: - ###### CHANGE ME START ###### + # Settings - Editable values device_name: "YOUR_NSPANEL_NAME" wifi_ssid: !secret wifi_ssid wifi_password: !secret wifi_password nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft" - - ##### addon-configuration ##### - ## addon_climate ## - cooler_relay: "1" #Use relay 1 - temp_units: "°F" #Temperatures in Fahrenheit - temp_min: "40" #Min supported temperature is 40°F - temp_max: "80" #Max supported temperature is 80°F - temp_step: "1" #Temperature granularity is 1°F - - ##### CHANGE ME END ##### + # Add-on configuration (if needed) + ## Add-on climate + cooler_relay: "1" # Possible values: "1" or "2" + temp_units: "°F" # Temperatures in Fahrenheit + temp_min: "40" # Min supported temperature is 40°F + temp_max: "80" # Max supported temperature is 80°F + temp_step: "1" # Temperature granularity is 1°F +# Customization area +##### My customization - Start ##### +##### My customization - End ##### + +# Core and optional configurations packages: remote_package: url: https://github.com/Blackymas/NSPanel_HA_Blueprint ref: main files: - nspanel_esphome.yaml # Core package - - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control - # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control - # - nspanel_esphome_addon_climate_dual.yaml # activate for local climate (dual) control + # Optional advanced and add-on configurations + # - advanced/esphome/nspanel_esphome_advanced.yaml + - nspanel_esphome_addon_climate_cool.yaml + # - nspanel_esphome_addon_climate_heat.yaml + # - nspanel_esphome_addon_climate_dual.yaml refresh: 300s esp32: @@ -111,38 +117,41 @@ esp32: type: esp-idf ``` -  -#### Heater: +#### Heater ```yaml substitutions: - ###### CHANGE ME START ###### + # Settings - Editable values device_name: "YOUR_NSPANEL_NAME" wifi_ssid: !secret wifi_ssid wifi_password: !secret wifi_password nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft" - - ##### addon-configuration ##### - ## addon_climate ## - heater_relay: "1" #Use relay 1 - temp_units: "°F" #Temperatures in Fahrenheit - temp_min: "40" #Min supported temperature is 40°F - temp_max: "80" #Max supported temperature is 80°F - temp_step: "1" #Temperature granularity is 1°F - - ##### CHANGE ME END ##### + # Add-on configuration (if needed) + ## Add-on climate + heater_relay: "1" # Possible values: "1" or "2" + temp_units: "°F" # Temperatures in Fahrenheit + temp_min: "40" # Min supported temperature is 40°F + temp_max: "80" # Max supported temperature is 80°F + temp_step: "1" # Temperature granularity is 1°F +# Customization area +##### My customization - Start ##### +##### My customization - End ##### +# Core and optional configurations packages: remote_package: url: https://github.com/Blackymas/NSPanel_HA_Blueprint ref: main files: - nspanel_esphome.yaml # Core package - # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control - - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control + # Optional advanced and add-on configurations + # - advanced/esphome/nspanel_esphome_advanced.yaml + # - nspanel_esphome_addon_climate_cool.yaml + - nspanel_esphome_addon_climate_heat.yaml + # - nspanel_esphome_addon_climate_dual.yaml refresh: 300s esp32: @@ -150,3 +159,45 @@ esp32: type: esp-idf ``` +#### Dual + +```yaml +substitutions: + # Settings - Editable values + device_name: "YOUR_NSPANEL_NAME" + wifi_ssid: !secret wifi_ssid + wifi_password: !secret wifi_password + + nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft" + + # Add-on configuration (if needed) + ## Add-on climate + heater_relay: "1" # Possible values: "1" or "2" + cooler_relay: "2" # Possible values: "1" or "2" + temp_units: "°F" # Temperatures in Fahrenheit + temp_min: "40" # Min supported temperature is 40°F + temp_max: "80" # Max supported temperature is 80°F + temp_step: "1" # Temperature granularity is 1°F + +# Customization area +##### My customization - Start ##### +##### My customization - End ##### + +# Core and optional configurations +packages: + remote_package: + url: https://github.com/Blackymas/NSPanel_HA_Blueprint + ref: main + files: + - nspanel_esphome.yaml # Core package + # Optional advanced and add-on configurations + # - advanced/esphome/nspanel_esphome_advanced.yaml + # - nspanel_esphome_addon_climate_cool.yaml + # - nspanel_esphome_addon_climate_heat.yaml + - nspanel_esphome_addon_climate_dual.yaml + refresh: 300s + +esp32: + framework: + type: esp-idf +``` diff --git a/docs/alarm.md b/docs/alarm.md index ee4a4d6..891a548 100644 --- a/docs/alarm.md +++ b/docs/alarm.md @@ -4,33 +4,41 @@ You can control an Alarm Control Panel from your NSPanel, which will allow you t Currently, only alarms without a code or alarms with a numeric code will be supported. If your alarm requires a text code, you will still be able to display it on your NSPanel, however, when you click in any button it will send services calls to Home Assistant without the code and it will fail for the calls where a code is required. -  ### Security advisory -By default, the communication between your NSPanel (ESPHome) and Home Assistant (HA) is not encrypted, which means a person with access to your network could potentially monitor the communication between your panel and HA and replicate the service calls. Although this is not a big issue for most of the service calls (turn-on a light, close a curtain, etc.), it can be a problem when controlling your alarm system.
-Based on that, we hardly reccoment the use of API encryption for all users controlling an Alarm system via a NSPanel. You can easily enable this by following the ["API encryption" example available here](customization.md#api-encryption). +By default, the communication between your NSPanel (ESPHome) and Home Assistant (HA) is not encrypted, which means a person with access to your network could potentially monitor the communication between your panel and HA and replicate the service calls. +Although this is not a big issue for most of the service calls (turn-on a light, close a curtain, etc.), it can be a problem when controlling your alarm system.
+Based on that, we hardly reccoment the use of API encryption for all users controlling an Alarm system via a NSPanel. +You can easily enable this by following the ["API encryption" example available here](customization.md#api-encryption). -  ## Configuration + ### Allow the device to make Home Assistant service calls + First, you have to configure your Home Assistant to allow your panel to make service calls. All other services are called from the Blueprint, however this requires the ESPHome to send an event containing in plain text all the information needed to the service call, which could be a security issue, so all the alarm calls will be driven by the panel to ensure a safer environment.
-To enable this option, go to your ESPHome integrations panel (Settings > Devices and Services > ESPHome) and click "Configure" next to the entry related to your panel:
+To enable this option, go to your ESPHome integrations panel (Settings > Devices and Services > ESPHome) and click "Configure" next to the entry related to your panel: + ![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/37bfc622-c0cd-4941-a397-3eeb2ddbe6a2) -Then check the option "Allow the device to make Home Assistant service calls":
+Then check the option "Allow the device to make Home Assistant service calls": + ![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/9b20a1b6-94ad-4fff-aef2-eb3599db9bf1) -
+ ### Blueprint settings + Open the automation based on the NSPanel Blueprint and look for a section related to "Alarm Control Panel".
-Select your alarm control panel entity, click "Save", and your are done. :sunglasses:
+Select your alarm control panel entity, click "Save", and your are done. :sunglasses: + ![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/859d3f4b-9a05-4694-9e2c-c32ab3a5e22f) - -  ## Controlling your alarm from your panel -When an alarm control panel is set in your Blueprint automation, you will see the alarm icon on your panel's Home page. This icon will change following the alarm state as described in the table below. -A click on that icon will show the Alarm Control Panel page:
+When an alarm control panel is set in your Blueprint automation, you will see the alarm icon on your panel's Home page. +This icon will change following the alarm state as described in the table below. + +A click on that icon will show the Alarm Control Panel page: + + ![image](https://github.com/Blackymas/NSPanel_HA_Blueprint/assets/94725493/bc312981-3d5a-42c7-b0b4-203457ff549f) You can change your alarm settings with a single click on the button related to the new state you want to set your alarm to, or close the page to go back to Home page. diff --git a/docs/blueprint.md b/docs/blueprint.md index f3ebdb8..10fe8ea 100644 --- a/docs/blueprint.md +++ b/docs/blueprint.md @@ -9,18 +9,19 @@ The individual elements of the Blueprint are described below. It is possible to change both the color of the labels and the icons for most of the elements on each screen. -On the blueprint settings, you will be able to select any of the MDI icons supported by Home Assistant, however, your panel will only support the icons available on this library: -``https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html`` +On the blueprint settings, you will be able to select any of the MDI icons supported by Home Assistant, however, your panel will only support the icons available on the [HASwitchPlate Material Design Icons](https://htmlpreview.github.io/?https://github.com/jobr99/Generate-HASP-Fonts/blob/master/cheatsheet.html). For an easier overview, the menu items "Icon Color" and "Label Color" will not be described separately in the following documentation. ## Basic settings ### NSPanel device (REQUIRED) + You will be presented with a list of all of your ESPHome ESP32 devices and you must select your panel from the list. This is technically the only required field, as basic functionality will be available when the Blueprint knows to which panel it have to send the settings. +> [!NOTE] > You cannot have more than one blueprint based automation per each panel ### Language for NSPanel diff --git a/docs/customization.md b/docs/customization.md index aa9eb03..e786ea2 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -51,49 +51,52 @@ You should add your customizations at the end of your ESPHome yaml, as in the ex ```yaml substitutions: - ###### CHANGE ME START ###### + # Settings - Editable values device_name: "YOUR_NSPANEL_NAME" wifi_ssid: !secret wifi_ssid wifi_password: !secret wifi_password - nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft" - nextion_blank_url: "http://homeassistant.local:8123/local/nspanel_blank.tft" + nextion_update_url: "http://homeassistant.local:8123/local/nspanel_us.tft" + + # Add-on configuration (if needed) + ## Add-on climate + # heater_relay: "1" # Possible values: "1" or "2" - ##### addon-configuration ##### - ## addon_climate ## - # addon_climate_heater_relay: "1" # possible values: 1/2 +# Customization area +##### My customization - Start ##### - ##### CHANGE ME END ##### +# Encrypt the communication between ESPHome and Home Assistant +api: + encryption: + key: !secret api_encryption_key +# More detailed log (for troubleshooting only) +logger: + level: VERBOSE + +##### My customization - End ##### + +# Core and optional configurations packages: remote_package: url: https://github.com/Blackymas/NSPanel_HA_Blueprint ref: main files: - nspanel_esphome.yaml # Core package - # - nspanel_esphome_addon_climate_cool.yaml # activate for local climate (cooling) control - # - nspanel_esphome_addon_climate_heat.yaml # activate for local climate (heater) control - # - nspanel_esphome_addon_climate_dual.yaml # activate for local climate (dual) control + # Optional advanced and add-on configurations + # - advanced/esphome/nspanel_esphome_advanced.yaml + # - nspanel_esphome_addon_climate_cool.yaml + - nspanel_esphome_addon_climate_heat.yaml + # - nspanel_esphome_addon_climate_dual.yaml refresh: 300s esp32: framework: type: esp-idf - - -##### My customization - Start ##### -# Encrypt the communication between ESPHome and Home Assistant -api: - encryption: - key: !secret api_encryption_key -# More detailed log (for troubleshooting only) -logger: - level: VERBOSE -##### My customization - End ##### ``` -  ## Examples + ### API encryption This is highly recommended when you are transfer sensitive information between your panel and Home Assistant, as when you use your panel to enter the PIN for an Alarm Control Panel. @@ -103,10 +106,12 @@ api: encryption: key: !secret api_encryption_key ``` -  + ### Custom OTA password -By default, the Wi-Fi password will be used as your OTA password, but you can replace it.
+By default, the Wi-Fi password will be used as your OTA password, but you can replace it. + First, you need to change the default password using this code. + ```yaml # change OTA password, remove after flashing esphome: @@ -119,15 +124,18 @@ ota: password: !secret wifi_password id: my_ota ``` + After flashing the device, you must remove the code above and replace it with the code below to start using this customization. + ```yaml # Use my global OTA password ota: password: !secret ota_password ``` -  + ### Web server credentials By default, the web server credentials are defined by this project using `admin` as `username` and your `Wi-Fi password` as `password`, but you can replace it using this customization: + ```yaml # Custom web server credentials web_server: @@ -135,19 +143,23 @@ web_server: username: !secret web_server_username password: !secret web_server_password ``` -  + ### Reboot when API fails -Reboot your panel if it loses it's connection to Home Assistant for more than a certain time (15 minutes in this example).
-Sometimes the low level ESP functions could report that the ESP is connected to the network, when in fact it is not and only a full reboot fixes it.
+Reboot your panel if it loses it's connection to Home Assistant for more than a certain time (15 minutes in this example). + +Sometimes the low level ESP functions could report that the ESP is connected to the network, when in fact it is not and only a full reboot fixes it. + To support long times without Wi-Fi, this is disabled by default in this project, but you can set a reasonable interval to restart, based on your network reliability. + ```yaml # Reboot if HA is not connected for 15 minutes api: reboot_timeout: 15min ``` -  + ### Manual IP Set IP address manually. + ```yaml # Set IP address manually wifi: @@ -158,9 +170,10 @@ wifi: gateway: 192.168.0.1 subnet: 255.255.255.0 ``` -  + ### Hidden Wi-Fi Connect to a hidden Wi-Fi network. + ```yaml # Connect to a hidden Wi-Fi network. wifi: @@ -169,9 +182,10 @@ wifi: hidden: true fast_connect: true ``` -  + ### Connect to multiple networks NSPanel will attempt to connect to the one with the highest signal strength or, if you set a priority, it will try to connect to the highest priority. After failing it will connect to the second network. + ```yaml # Set dual network wifi: @@ -182,9 +196,10 @@ wifi: password: !secret wifi_password_backup priority: 0 ``` -  + ### SNTP (time) server ESPHome takes it's time from Home Assistant, however you can configure it to use a Network Time Server instead. + ```yaml # Use my own local network time server time: @@ -197,9 +212,9 @@ time: - 0.pool.ntp.org ``` -  ### Sensor for display awake vs sleeping Creates a binary sensor to indicate either when the display is showing some page (`on`) or sleeping (`off`). + ```yaml # Is display awake? binary_sensor: @@ -211,6 +226,7 @@ binary_sensor: ``` You can easily invert the meaning to have a sensor for display sleeping: + ```yaml # Is display sleeping? binary_sensor: @@ -221,11 +237,11 @@ binary_sensor: return (id(current_page).state == "screensaver"); ``` -  ### Deep sleep In this example, the panel will deep sleep for 7 hours, starting at 23:00:00 every day, for its maximum energy saving. -During this time, nothing will be shown, the screen will be off and therefore no response to touch, and the panel will be disconnected from Wi-Fi, but you can still wake-up the panel by pressing one of the hardware buttons (the left one in this example): +During this time, nothing will be shown, the screen will be off and therefore no response to touch, and the panel will be disconnected from Wi-Fi, +but you can still wake-up the panel by pressing one of the hardware buttons (the left one in this example): ```yaml # Define the wake-up button. Use pin 14 for left button or pin 27 for right button @@ -253,7 +269,6 @@ time: You can find more ideas around this on [#955](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/955). -  ### Enforce time zone Until v3.4 (including), the time was coming from Home Assistant with it's timezone, so the Blueprint was sending the info with no transformation, to the panel. From v4.0, the time reference still coming from HA (or optionally from a time server), but is calculated in ESPHome, which will try to detect the timezone from the server. @@ -267,20 +282,20 @@ time: timezone: "America/Cancun" ``` -  ### Compiling ESPHome on lower powered machines For systems with lower CPU or memory capabilities, like an RPi 3 or systems with less than 2GB of RAM, this could help preventing errors caused by lack of resources when compiling ESPHome firmware. More datails on the [ESPHome docs](https://esphome.io/changelog/2022.11.0.html#running-esphome-on-lower-powered-machines). + ```yaml # Limit the amount of resources used for compiling esphome: compile_process_limit: 1 ``` -  ### Sleep & Wake-up buttons There are several ways to wake-up or put your panel to sleep, but in this example we tried a simple approach by adding two buttons (you can implement only one of those if you want): + ```yaml button: # Adds a button to put the panel to sleep @@ -309,9 +324,9 @@ button: id(timer_dim).execute(id(wakeup_page_name).state.c_str(), int(id(timeout_dim).state)); ``` -  ### Set display as a light -You can set your display as a light in Home Assistant, so you can control the brightness and turn on/off just like any other light, and even use this in your automation to control when your panel is on with the same automation you use for your lights: +You can set your display as a light in Home Assistant, so you can control the brightness and turn on/off just like any other light, +and even use this in your automation to control when your panel is on with the same automation you use for your lights: ```yaml light: @@ -381,11 +396,14 @@ script: } ``` -  ### Scheduled actions -Although ESPHome doesn't have a Scheduler component, it is possible to use the timer to schedule actions and this is entirely managed in the device, so it will work even if Home Assistant and/or the Wi-Fi are unavailable. +Although ESPHome doesn't have a Scheduler component, it is possible to use the timer to schedule actions and this is entirely managed in the device, +so it will work even if Home Assistant and/or the Wi-Fi are unavailable. + Following some examples: + #### Scheduled relay + ```yaml # Scheduled relay time: @@ -412,8 +430,11 @@ time: then: - switch.turn_off: relay_1 ``` + #### Scheduled climate +> [!NOTE] > This requires add-on climate to be installed + ```yaml # Scheduled climate time: @@ -445,13 +466,14 @@ time: target_temperature: 18°C ``` -  ### Framework `esp-idf` +> [!IMPORTANT] > When switching from `arduino` to `esp-idf`, make sure to update the device with a serial cable as the partition table is different between the two frameworks as [OTA Update Component](https://esphome.io/components/ota) updates will not change the partition table. The `arduino` protocol still more popular and therefore more components are available, but as `esp-idf` is maintained by EspressIF and is kept updated, more boards are supported and the memory management is better, making it ideal if you wanna customize your panel to support memory consumption functionalities, like `bluetooth_proxy` or [Improv](https://www.improv-wifi.com/). -This project currently uses `arduino` as default framework, but we are planning to set `esp-idf` as default from March 2024. In any case, you can overlap the settings with this customization. +This project currently uses `arduino` as default framework, but we are planning to set `esp-idf` as default from March 2024. +In any case, you can overlap the settings with this customization. For more info about frameworks, please visit [ESPHome docs](https://esphome.io/components/esp32). @@ -462,8 +484,8 @@ esp32: type: esp-idf ``` -  ### Bluetooth proxy +> [!IMPORTANT] > The [ESP32 Platform](#framework-esp-idf) component should be configured to use the `esp-idf` framework, as the `arduino` framework uses significantly more memory and performs poorly with the Bluetooth proxy enabled. ```yaml @@ -474,9 +496,10 @@ wifi: power_save_mode: LIGHT ``` -  ### Logger via UART -By default, the logging via hardware UART is disable in this project. You can enable it by setting the baud rate accordingly to your interface: + +By default, the logging via hardware UART is disable in this project. +You can enable it by setting the baud rate accordingly to your interface: ```yaml # Enable hardware UART serial logging @@ -484,7 +507,6 @@ logger: baud_rate: 115200 ``` -  ### Climate custom presets ```yaml @@ -507,7 +529,6 @@ climate: mode: "heat" ``` -  ### Push button / Momentary switch You can set the physical relays to be `on` only while the hardware buttons are pressed, and then back to `off` when the buttons are released: @@ -534,12 +555,17 @@ binary_sensor: switch.turn_off: relay_2 ``` -  ### 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. +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. #### 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. +One application, as utilized by @tikismoke and detailed in [#1349](https://github.com/Blackymas/NSPanel_HA_Blueprint/issues/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. diff --git a/docs/install.md b/docs/install.md index 182be4c..a1735aa 100644 --- a/docs/install.md +++ b/docs/install.md @@ -72,7 +72,7 @@ Follow these steps to add a new device in the ESPHome Dashboard: wifi_password: !secret wifi_password nextion_update_url: "http://homeassistant.local:8123/local/nspanel_eu.tft" # Add-on configuration (if needed) - # heater_relay: "1" # possible values: 1/2 + # heater_relay: "1" # Possible values: "1" or "2" # Customization area ##### My customization - Start ##### diff --git a/docs/tft_upload.md b/docs/tft_upload.md index 7e5c72a..71b3c86 100644 --- a/docs/tft_upload.md +++ b/docs/tft_upload.md @@ -64,6 +64,7 @@ esp32: framework: type: esp-idf ``` + #### Arduino ```yaml