-
Not sure if this is already something the blueprint can do? I do not find any settings about it in the blueprint. Use Case is the relay can be connected to some smart bulbs or even another smart relay that control multiple devices. So would want some settings where I can set the Relay to always turn on after power up. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
You will have to use in advanced mode, for which you will find some instructions on Wiki. But basically, copy the full content of the file |
Beta Was this translation helpful? Give feedback.
-
this is not required - see: #352 (comment) |
Beta Was this translation helpful? Give feedback.
-
Just to chime in, in case anyone ever needs this info. The "easiest" way I found on how to customize the yaml is to fork this repo, make the desired changes and reference your fork in the top-level yaml of your ESPHome device. Here's an example. I strongly suggest to not reference my fork in your project as it's pretty much tailored to my needs and I won't notify anyone if I make any changes to it. Here's my fork: Here's the commit I customized the behavior of Relay 2: And here's how it looks in ESPHome
Notice the package reference URL points to my forked github repo. To update with upcoming version updates from the original repo, you would just need to merge upstream into your fork and fix conflicts if any. |
Beta Was this translation helpful? Give feedback.
-
Well, with the latest versions this can be much easier... switch:
- id: !extend relay_2
restore_mode: RESTORE_DEFAULT_ON # or ALWAYS_ON |
Beta Was this translation helpful? Give feedback.
-
as such?
|
Beta Was this translation helpful? Give feedback.
You will have to use in advanced mode, for which you will find some instructions on Wiki.
But basically, copy the full content of the file
nspanel_esphome.yaml
and paste replacing your currently esphome yaml, then fix the substitutions in the beginning of the file (wifi credentials, device name, TFT url, etc) and look for theswitch
area of that file, where you will find one entry forrelay_1
and one forrelay_2
. Those haverestore_mode: RESTORE_DEFAULT_OFF
, which you can change torestore_mode: ALWAYS_ON
. Then you install that into your panel.https://esphome.io/components/switch/index.html