Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Retain Switch status ESPHome after reboot and update / Ethernet setup
#4
the switch yaml code you can add "restore_mode" for that.
fox example:
switch:
- platform: gpio
name: "Relay"
pin: GPIO12 # your relay GPIO
id: relay
restore_mode: RESTORE_DEFAULT_ON # or RESTORE_DEFAULT_OFF or ALWAYS_OFF/ALWAYS_ON

here is ESPHome about "restore_mode" setting details: https://esphome.io/components/switch/index.html
Reply


Messages In This Thread
RE: Retain Switch status ESPHome after reboot and update / Ethernet setup - by admin - 10-14-2024, 10:34 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)