Widget for sun rise / set shutter automation

Hey,

I am currently migrating from SmarthomeNG and smartVisu to home assistant.

In smartVisu there is a straight forward widget to accomplish a straight forward task:
image

You can define here the weekdays, than a custom value which will be send to the device, a time (or event in expert mode), enable / disable toggle (Expert mode on: “Not earlier than” time, event (sun rise / sun set), offset, minutes or degrees, “not later than” time, turn on / off expert mode, calculated: when will it happen tomorrow)

This widget is super straight forward and covers everything, that I can think off. Is there something similiar in home assistant? I understand that I need to write it in YAML, but I did not find a proper template to cover all of this simple widget.

What I actually need is:

  • Open my shutters on sunrise with an offset of 15 minutes, but not before 6:00 AM and not later than 08:00 AM.
  • Close my shutters on sunset with an offset of -20 minutes, but not before 6:30 PM and not later than 10:00 PM.

You do not.

All of this can be accomplished with the GUI automation editor.

The basic building block you’ll use is a Schedule - Home Assistant entity. You create the schedule however you want, then you use it in your automation (which you can write using the GUI) to activate your shutter when the schedule switches to on and deactivate it when the schedule switches back to off.

If what you want is to sync your shutter to sunrise / sunset, you’ll use the state of the Sun - Home Assistant entity to do that instead.

You can also combine these in your automation logic, so that the shutter activates if e.g. the sun is down OR the schedule is on, and deactivates if the sun is up AND the schedule is off.

See Make smarter automations, not more automations - Home Assistant Conference 2020 - YouTube for the pattern to follow in order to combine event sources.

thanks a lot! I will have a deeper look into this in the following days. Today I was busy with some easier tasks, like power management etc…

I guess I have an idea on what you are pointing me towards @Rudd-O, but I am really suprised that there is nothing more straight forward (comparable to the plugin, that I posted).

It will be challenging, but I’ll post my results / questions here.

Thanks again :slight_smile:

HA is more like LEGO than like TONKA, because rarely if ever there is a one-size-fits-all way of accomplishing a particular goal. That said, there are automation blueprints and ready-made dashboards you can import to your setup, if they fit your use case.