Simple Scheduler Addon

what might be interesting would be to define sunrise and sunset as time. but i donā€™t know if this is possible with static json files.

Nicely done!

Iā€™d like to respectfully request if this could be expanded to include input_booleans and automatons as well?

2 Likes

Thank you so much!!!

You hit the point!
I put the word simple in the name for a reasonā€¦ :rofl:
By the wayā€¦ you can never sayā€¦ :stuck_out_tongue_winking_eye:

Oh my, thereā€™s a lot of stuff in hereā€¦ :stuck_out_tongue_winking_eye:
Ok, letā€™s seeā€¦

Disable slider: well, you problably didnā€™t consider the mobile version. My wife only use the android app. It would be easy to tap on that by mistake. I even remove the icon in mobile view (the row become dimmed, so it is clear to understand).

Checkbox: Yes, that was my first idea. But it requires some javascript and a little effort to achieve that. It was easier this way. I primarly focused on the functionality. But it is in my mind.

More entities: Iā€™m not sure it would be cozy. It would also make the editing more tricky and give user more chance to make a mess.

Condition: Thatā€™s far away from the pourpose of this addon. I never stop repeating that it has to be simple. Conditions are greatly implemented in HA, and they are mented for advanced user. You set the rule, you (mostly) never touch it again. This addon want to add something that was missing in HA, for (almost) everyday use. Last but not the least, Implement a condition engine in the addon would be very very very very complicated. (Did I say very?). I hope you will get my point

I call service.turn_on and service.turn_off which works for both switches and lights.
Covers have different services (service.open_cover, service.close_cover, and so on)
This would require a major change in codeā€¦ :thinking:

Thanks for the respect! :stuck_out_tongue_winking_eye:
You can find your answers as for the above quote

1 Like

Thank you for sharing this useful addition to Home Assistant. I donā€™t want to discourage further development but feel you should know that there is work underway to develop a scheduling integration.

To be clear, discussion started a year ago and itā€™s unknown how much more time is needed before it is ready to be released. In addition, it is the engine and not the accompanying UI that must also be developed to allow userā€™s to interact with the engine. Therefore it may be some time before we see anything that looks like the add-on youā€™ve created (but it will be released eventually).

1 Like

You need to be careful with your wishes because if you simply call homeassistant.turn_on/turn_off service it might end up like this :wink:

tl;dr for automations it should be automation.trigger service rather than homeassistant.turn_on/off

Thank you for your advice.
I needed the scheduling right now, so I created it by myself.
It tooks me a week of work and it gave me the chance to understand a lot of things under the hood about HA, starting from docker.
When the scheduler integration will be ready, this addon will become useless.
In the meanwhile, I hope it helps the community!

Thanks again!

4 Likes

Just a few things which come in mind when I tested.

You are right, the name says ā€œsimpleā€. So if you want to keep it simple, its already perfect.

More entities or conditions got the potential to make it a ā€œdifficult Schedulerā€. But if you want to expand the capabilities of your addon, just put my notes to a future feature list and think about it :slight_smile:
Or you can make a second addon. A simple scheduler and a universal scheduler.

2 Likes

I really like this, and itā€™s written in php so bonus. Would you be willing to accept prā€™s?

Hi @Sabuto
Iā€™m kinda new to all this git world. (It took me 5 minutes to understand your question :rofl:)
I have to learn it because of this project.
Iā€™m not a corporate programmer (maybe Iā€™m not a programmer at all), so Iā€™m not familiar with team working.
Please, donā€™t get me wrong, Iā€™m still not prepared to this.

What would be your idea of improvement?

So looking through the code you use jquery but only on the tooltip. I would probably change out the rest to use jquery (just for readability). I would also be happy to implement some of the ideas other have had with the different things like climate etc

Also just out of interest why do you pull the python image?

JQuery is there not just for tooltip. I planned to use Datatable to sort columns and to use rounded toggle buttons instead of checkboxes. Being this just esthetics, I postponed.

The python image is a mistake due to laziness :rofl:. The first version of the scheduler engine was in python and I didnā€™t want to rewrite it. But I was having trouble running it in docker along with PHP. So I convert it to PHP. I forgot to remove python image from Dockerfile. Thank you for the tip.

Not for my use case. I have automations that control my house climate. I want them enabled or disabled for certain periods. They may then be triggered by temperature during those periods.

3 Likes

Fair enough. Just wanted to point out the difference as sometimes it does matter.
Your heating control is HUGEā€¦

2 Likes

Np lol, also whenever you do getelementby[name,Iā€™d etc] you could use jquery

1 Like

+1 for this. That would make it far more powerful.

That said, it is awesome already

1 Like

The Automation bit is normally hidden in a folded row.

Having said thatā€¦ all the time entities would disappear with access to automations by this addon.

Version 0.08 released!
Now the addon supports this components:

  • light
  • switch
  • script
  • camera
  • climate
  • automation
  • media_player
  • scene (experimental)

You can disable some of those components from configuration if you donā€™t need them and you prefer to reduce the length of the dropdown list. Just set the component you donā€™t need to to false.
Probably you will have to rewrite the translations in the configurationā€¦ sorry about thatā€¦ I thought that items should be re-arranged with the new parameters.

5 Likes

fantastic, great addon, will try now.

Ok, installed so far so good.

A couple of requests:
Maybe split the selection in light, switch, and so on, for those who have a long list of devices (this is minor)
Put the sunrise and sunset options, instead of the time

1 Like

for non sophisticated people, like me, this addon is way way way simpler then Shedy, which I try toi install but was far from easy to understand (for me at least)

3 Likes