For the past few days I’ve been busy switching from Domoticz to Home Assistant, so I’m completely new to Home Assistant.
Since summer is once again showing its best side, I want to automate my blinds as soon as possible.
However, when creating an automation I get completely stuck and I can’t figure out what I’m doing wrong or where the error is. I myself suspect that I am going wrong because I want to use data from my own weather station (PWS) (for which there is no out-of-the-box integration) or from data from my solar panels, which I get from the cloud using an API from Solaredge.
For the shutters to close there must be a certain temperature in the living room, the time of day must be between sunrise and sunset (or between 06:00 and 18:00) and the solar panels must produce an x amount of W/m or the solar intensity of my weather station must have reached a certain value (otherwise the shutters will close also in cloudy weather).
Who can help me with this?
This is what I have managed to fabricate so far, but it does not work:
Thnx for your reaction!
Burn motherfucker burn…
Now what did I do wrong?
That I gave the value of solar intensity the same ID as the value for temperature?
To keep it simple, I took out the 30 minutes after sunrise and adjusted the id of that value.
I have now created 2 simple automations (shutters open at sunrise and shutters closed at sunset). I’d like to explore this further, but in this case it’s also a race against time with large windows in the living room on the south…
triggers when your tado shows a temp more than 22.6 for more than 5 mins AND
your solar radiation shows more than 275 for more than 5 minues
then it will verify if it is 30 mins past sunrise
if still ok…then send stop to some rf433 device
You could test this out through the States tab in Developer tools and set the states for tado + solar to those values … probably you need to quickly change the trigger ‘for’ to a few seconds else these might refresh within 5 mins
I got it working, because I apparently made a mistake in the approach to the trigger. I have now used time for that, because I want to keep checking all day to see if the conditions are met. For example, if it’s heavily cloudy for the first three hours of the day, I do want the shutters to just close after that, too.
This is what I’ve made of it so far:
alias: Rolluiken zomer test
description: De voorlopige test automatisering van de rolluiken
- platform: time_pattern
- type: is_temperature
- type: is_illuminance
- device_id: 52f8d7c83b6ff53b6xxxxxx
Now I want to go further and was wondering if it is possible to put, for example, the opening and closing of the shutters at sunrise and sunset also in the automation, so that it becomes an automation for these shutters.
How should I go about doing that?
Is it simply copying the code from those 2 other files and putting it into this one?
First of all… on the conditions, you possibly (?) need an ‘and’ between them, check the gui setup for that…there is a ‘and’ condition.
On the other question, you can use actions ‘choose’ or if/then.
1 every 10 minutes check
if between sunrise/sunset (sun.sun = above_hoirzon) …run above script
btw… for my lights&motion detector, I do not use sun.sun above horizon as in summer this responds way too late in the morning and way to early in the evening. I used sun2 (hacs) integration and created a dawndusk sensor with it.
Depends on what you need of course…ideal would be a lux detector but I only have one HUE and this one is poor on low lx values
So far, it is actually working fine and I don’t understand why I should put an “and” in between the conditions, because “Conditions are optional and prevent further execution unless all conditions are met”.
That implies that all conditions have an “and”, or am I misunderstanding this?
As I wrote, the matter is completely new to me and my moderate knowledge of the English language (I’m an old man ) doesn’t really help either. However, up to now this has never stopped me from achieving results in Domoticz and I expect that in HA this will not be different.
I have my whole house and garden full of Hue, also use many motion and light sensors. I also have several sensors from Xiaomi and Aqara.
So far I’m still controlling most of it with Hue automations, but in the future I want to automate everything with HA.
The automation of the roller shutters is also a stepping stone project for me to gain insight into the subject matter, because like many men I am more of the learning by doing than reading to learn.
sun2 I’m going to take a look at, because obviously that was made for a reason.
I doublechecked and indeed, not specifying AND/OR implies AND by default… I too get lost with the many options so I just add “AND” to my automations for reminding me what it does
As mentioned, I only have on hue light sensor in-house (part of the motion sensor) and this one is pretty poor on low lightlevels where it quickly drops to 1 (lowest) although I can still see light outside. At the moment not interested to buy another one and using dawndusk which is fine for me… which of course does not cover the cloudy side of things but… it does not have to be perfect