I currently have two switches (relevant to this topic) defined:
wake_on_lan switch which will power up and (by a webhook) shut down my PC
- A RESTful switch which uses an endpoint on my PC.
Obviously, the RESTful switch is dependant on my PC being available. Is there any way to:
- Stop polling the REST endpoint when the PC switch is off and just assume it is OFF, and/or
- Ensure the PC is on before trying to turn the REST switch on?
Thanks in advance
Set a really long polling interval for the rest sensor (years).
Use a time pattern triggered automation to update the rest sensor with the
Prevent this from happening with a state condition based on the WoL switch state.
In your rest sensor value template also take into account the WoL switch state (state = ‘off’ if WoL is off).
You may also have to add a state trigger to the automation when the WoL switch goes on → off, to ensure the restful off state gets applied.
Brilliant, thank you so much.