Folks, I try to get my shutter automation"s" into one single automation.
I currently have 4 automations with no shading option, so I also want to add the sun shading to this single big automation, if possible.
But I dont see if this is possible, hence I ask here, and since we got a bunch of shutters and awnings, its going to get a bit crowded by the shutters alone if I keep my “one automation per step” style up.
I also struggle with the climacell_hourly max for 14:00:00, I see it in lovelace, but cant get it in automations or yaml code.
I have sonoff Dual R2 tasmota controlled electric shutters (0-10% is only the lamellaes geting stretched, from 10% on there is an opening on the bottom of the shutter, at 98% the shutters vanish from the window),
They all
- pre-open on sun.sun elevation -6° and sun.sun rising to 20 %
- fully open when first daylight is detected (>1 Lux from WH2900 weather station) or when elevation is >5° (in case snow on sensor or battery dead of WH2900) and sun.sun rising to 100%
- pre-close on < 1 Lux for 5 min. from WH2900 or -5° elevation and sun.sun rising false to 20%
- fully closed on -12° elevation and sun.sun rising false to 0%
Here is my code from automations.yaml, they are working just fine, I deleted all devices from each except the first to keep it a bit shorter. (they just go on with cover_2, cover_3 etc. I start at North and go clocwise, so cover_2 is east facing etc.
(I may need to reconsider the pre-close for when the WH2900 sensor is dead for what ever reason and then probably reports constantly 0, it may starts closing the shutter at noon when sun.sun rising switches over to false. Haven’t tried that one yet. Probably need to add a condition, not before Elevation is < +5° or so. Does somebody have experience with that issue on the WH2900 (ecowitt integration via MQTT)
- id: '1642887933217'
alias: shutter - open to 20% at -6° and rising
description: ''
trigger:
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
above: '-6'
condition:
- condition: state
entity_id: sun.sun
state: true
attribute: rising
action:
- device_id: 15ee956a205e5fcb8c951520eed6eb72
domain: cover
entity_id: cover.tasmota_cover_1
type: set_position
position: 20
mode: single
- id: '1642888136771'
alias: shutter - close to 20% at Lux <1 or rlevation < -5 and not rising
description: ''
trigger:
- platform: numeric_state
entity_id: sensor.solar_radiation
for:
hours: 0
minutes: 5
seconds: 0
below: '1'
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
below: '-5'
condition:
- condition: and
conditions:
- condition: state
entity_id: sun.sun
state: false
attribute: rising
- condition: numeric_state
entity_id: sun.sun
attribute: elevation
below: '5'
action:
- device_id: 15ee956a205e5fcb8c951520eed6eb72
domain: cover
entity_id: cover.tasmota_cover_1
type: set_position
position: 20
mode: single
- id: '1642888195982'
alias: shutter - close to 0% at -12° and not rising
description: ''
trigger:
- platform: numeric_state
attribute: elevation
entity_id: sun.sun
for:
hours: 0
minutes: 0
seconds: 0
below: '-12'
condition:
- condition: state
entity_id: sun.sun
state: false
attribute: rising
action:
- device_id: 15ee956a205e5fcb8c951520eed6eb72
domain: cover
entity_id: cover.tasmota_cover_1
type: set_position
position: 0
mode: single
- id: '1642888694478'
alias: shutter - open to 100% at Lux >1 or elevation > 5 and rising
description: ''
trigger:
- platform: numeric_state
above: '1'
entity_id: sensor.solar_radiation
- platform: numeric_state
entity_id: sun.sun
attribute: elevation
above: '5'
condition:
- condition: state
entity_id: sun.sun
state: true
attribute: rising
action:
- device_id: 15ee956a205e5fcb8c951520eed6eb72
domain: cover
entity_id: cover.tasmota_cover_1
type: set_position
position: 100
mode: single
For the shading I tried to follow this one
how to automation for blinds in here
But I could not get my forecast value from Climacell_hourly for say 14:00:00, its there in lovelace, but I cant get it in the automation. Yes Im still novice with HA, have been running a FHEM for years, but never got a nice front end done. So the WAF (wife acceptance factor) was negative and that’s a sure project killer. She saw HA at a friends home and he told me how easy the front end was. Here I am.
Also I’m at a loos for the shutter position calculation. in FHEM there was a template, where you would enter the window height, the direction the window is facing (if its roof, also its angle deviation from vertical) and the wall thickness and where the shutter comes down measured from outside wall, the inside windowsill width (but I think that was in the wall thickness included) etc. and it would calculate the position for the shutter from that data and move all shutters individually on a given interval (say 4 mins or so) to the now new position. That fit almost perfect right out of the box. a bit tuiking and it was awesome. It had to fit, as we did not have a way to modify the shutter manually, due to missing front end… the WAF was still negative on FHEM, for the missing option to control them manually, but at least she did not kick my but every day, only so often when she wanted a shutter at an other position and could not move it.
(I also would need a switch for each shutter to activate night closing and shading individually)
I do not need to replicate this, I only got windows with shading requirements going straight to 90°, 180° and 270°, all vertical.
But I am pretty sure, there are lots of folks who live in plenty hotter areas, and would love such an easy template. put in all windows, and your conditions, and its moving like a miracle.
For starts I would be pretty happy if I would have to calculate or measure the opening % for each window in regard to elevation during the next summer and hardcode a table with all angles into HA for each window. I do not expect them to change that much in the next 40 years if so we absolutely do have other problems to worry about :-D.
(I also could let FHEM handle the shading, but my VM capability is limited on my server, so I would like to switch of FHEM, its eating on my memory just for the shading…, and all interactions from HA would be nixed 4 minutes later by the next shading position from FHEM)
For Azimuth I would choose direction of window +/- 45° as sufficient range to activate shading.
My location has a max of 65,5° of elevation and a min elevation of about 17°. So my rule of thump would be upward of 35° of noon elevation I would generally activate the shading module.
Then I would like to use the climacell hourly 14:00 forecast to check if the day gets warmer than say 25°C, better maybe check for the highest temp of the day.
If so I would query the azimuth from -45° to +45° from the window in question every full ° (about every 4 minutes) if:
- current cloud cover is more than 60%
- if yes → go to 100% (open) (no shading required)
- if no → check for indoor temp from WH2900, over 22°C and Daikin AC is off (or if Daikin A/C is on then shading is active if indoor is over 18°C)
- move shutter to position according to calculation based on direction, size, width and sun elevation.
So every 4 minutes the shutters move, to new shading position or open up all the way.
Of course below -45° and above +45° azimuth relative to window its all open too.
Anybody has something like this?
Regards
Manne