I’m a new Home Assistant user. I’m moving my home automation setup over from Symcon which I’ve used for 10+ years. I’m looking for some guidance on the ‘best’ way to set up my system, as I’ve experienced that it’s usually easy to get ‘something’ to work, but doing it in a clean, maintainable way is hard (just like in programming, hah).
So my first sub-project is getting my curtains to open and close on time. I’m starting with just those in my living room and office. The rules I have in my current/previous system are:
- open both at 7h30 or sun rise, which ever is latest
- close both at sunset but no later than 22h
‘sunset’ here is ‘civil twilight’ as per the nomenclature of Twilight - Wikipedia .
So far from what I’ve tried, there are multiple ways I could set this up in HA:
The naive way is to make an automation for each curtain that is trigger at both 7h30 and sunrise, and open the curtain
if it’s not open yet, and the same in the evening. But this would require maintaining two automations that are identical except for the device they work on. It also means I have separate automations for opening and closing, so 4 in total, which is hard to document/keep track of.
I could write a script where I do all this in one place, I think? But then I’m programming it all. Which is harder to
integrate with other functionality. In setting up this system, I’m applying what I’ve learned from other HA systems in the past - don’t try to fight the design, but go along with it as much as possible. I’m feeling like writing scripts is going against the grain of most HA systems.
Can this be done with ‘blueprints’? Can I integrate several event responses in one blueprint?
Maybe other options?
Can anymore more experienced give me some philosophical guidance on what the current best practice is to get this to work, in a way that is most maintainable going into the future?
Additionally - is there a way to store notes in Home Assistant? Comments that document why each parameter was chosen or why things are set up the way they are? I’m finding my notes from my old system a huge help moving over, and I want to document as much as possible in this Home Assistant setup, but I do want to avoid doing so in a separate Word/text document which I just know is going to get out of sync.
One last question - what does the Home Assistant ‘sun down’ event mean? The docs say ‘the moment the sun goes below/above the horizon’, but what part of the sun and how does that relate to light level? What is the exact, technical concept of ‘sun rise’ and ‘sun down’ in Home Assistant?