arthurdent75 / SimpleScheduler

An Home Assistant AddOn to schedule entities on/off on weekly base
183 stars 36 forks source link

Possibility to force a schedule via automation #122

Closed rhoddan closed 1 year ago

rhoddan commented 1 year ago

Thanks for a great add-on. Good that there is a possibilty to enable/disable a schedule via an automation.

I wish to be able to also turn on / turn off a schedule same way (i.e for example run every normal settings via simple schedule but in some cases I also want to fire an turn on/dim or other command via an automation rule)

arthurdent75 commented 1 year ago

If you enable the MQTT feature in the addon, you will find in HA a switch to enable/disable every single scheduler. You can then change the state of the switch from your automation.

If you want to fire the execution of a scheduler, you should create a script and call the script from the addon. This way you could execute what you need both from the addon and from an automation by calling the script.

rhoddan commented 1 year ago

Yes, I know that it’s possible to enable/disable. I mean that if you have configure a bunch of lights etc and normally use the simple scheduler to turn on/off, in some cases you want to turn on/off these lights via an automation (not only enable/disable). The reason for that could be to send a turn off if my local lux sensor has reach a limit.

arthurdent75 commented 1 year ago

I mean that if you have configure a bunch of lights etc and normally use the simple scheduler to turn on/off, in some cases you want to turn on/off these lights via an automation

The solution, as I said, is to create two script (one for the "ON scenario" and one for "OFF scenario" and then call the scripts from the scheduler. This way you can also call the scripts from anywhere in Home Assistant, including automation.