drmouse
(Dr Mouse)
1
Hi all
I currently have two switches (relevant to this topic) defined:
- A
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
tom_l
2
Set a really long polling interval for the rest sensor (years).
Use a time pattern triggered automation to update the rest sensor with the homeassistant.update_entity
service.
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.
1 Like
drmouse
(Dr Mouse)
3
Brilliant, thank you so much.