deleted, problem was misconfiguration
Hi,
I’m still trying to get my automations to work… Only one seems to work even though I used the “duplicate” function. The settings are the same for all the shutters except the azimuth. Do you know why the others don’t work?
I still have one question that leaves me unsure. Is it essential to create a Cover Status Helper per section?
Hi, thanks for this great bluprint - I am using it on 2 shutters for some time for morning opening / evening closing without any problem.
Now I try to set it up for the shading optin only awning control with an Homematic HM-LC-Bl1PBU-FM without success. If I understand the trace log correct it seems to send the closing command but nothing happens:
platform: template
value_template: |-
{{
default_sun_sensor != [] and
state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_start) > shading_azimuth_start and
state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_end) < shading_azimuth_end and
state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_min) > shading_elevation_min and
(shading_brightness_sensor == [] or states(shading_brightness_sensor) | float(default=shading_sun_brightness_start) > shading_sun_brightness_start) and
(shading_temperatur_sensor1 == [] or states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) > shading_min_temperatur1) and
(shading_temperatur_sensor2 == [] or states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) > shading_min_temperatur2) and
(shading_forecast_sensor == [] or shading_weather_conditions == [] or states(shading_forecast_sensor) in shading_weather_conditions)
}}
for:
seconds: 300
enabled: '{{ is_shading_enabled }}'
id: t_shading_start_1
on shading end noting is happening as well:
platform: template
value_template: |-
{{
(shading_temperatur_sensor1 != [] and states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) < shading_min_temperatur1) or
(shading_temperatur_sensor2 != [] and states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) < shading_min_temperatur2) or
(shading_brightness_sensor != [] and states(shading_brightness_sensor) | float(default=shading_sun_brightness_end) < shading_sun_brightness_end) or
(shading_forecast_sensor != [] and states(shading_forecast_sensor) not in shading_weather_conditions) or
default_sun_sensor != [] and
(
(state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_max) > shading_elevation_max) or
(state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_max) > shading_elevation_max) or
(state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_end) > shading_azimuth_end) or
(state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_min) < shading_elevation_min)
)
}}
for:
seconds: 300
enabled: '{{ is_shading_enabled }}'
id: t_shading_end_1
any hint on how to get it running? Many thanks in advance
Is it possible to configure the sun shading position based on a template? I’ve got a roof window for which I like to configure the position based on the Azimuth of the sun (e.g. 125°-170° = 75%, 171°-250°=25%, >251°=75%).
Can I achieve this with additional actions for the sun shading? Are they triggered every time the Azimuth changes or are the only triggered once when shading begins?
Hi,
Thanks for this very good blueprint.
I have a question about sun elevation. I set the automation to close my shutters at -6 degree, but the automation is not triggered at -6 (to_state) but approximately at -7. The from_state is -6.
Someone has an idea about it and could explain it to me ?
trigger:
platform: template
entity_id: sun.sun
from_state:
entity_id: sun.sun
state: below_horizon
attributes:
next_dawn: '2024-07-30T03:23:15.048916+00:00'
next_dusk: '2024-07-30T19:46:36.739657+00:00'
next_midnight: '2024-07-29T23:35:28+00:00'
next_noon: '2024-07-30T11:35:28+00:00'
next_rising: '2024-07-30T04:01:22.475289+00:00'
next_setting: '2024-07-30T19:08:41.843070+00:00'
elevation: -6
azimuth: 307.03
rising: false
friendly_name: Sun
last_changed: '2024-07-29T19:14:05.620670+00:00'
last_reported: '2024-07-29T19:48:11.529808+00:00'
last_updated: '2024-07-29T19:48:11.529808+00:00'
context:
id: 01J400JFM9D1BBQDQXCZDCS3MC
parent_id: null
user_id: null
to_state:
entity_id: sun.sun
state: below_horizon
attributes:
next_dawn: '2024-07-30T03:23:15.048916+00:00'
next_dusk: '2024-07-30T19:46:36.739657+00:00'
next_midnight: '2024-07-29T23:35:28+00:00'
next_noon: '2024-07-30T11:35:28+00:00'
next_rising: '2024-07-30T04:01:22.475289+00:00'
next_setting: '2024-07-30T19:08:41.843070+00:00'
elevation: -7.05
azimuth: 308.62
rising: false
friendly_name: Sun
last_changed: '2024-07-29T19:14:05.620670+00:00'
last_reported: '2024-07-29T19:56:11.531017+00:00'
last_updated: '2024-07-29T19:56:11.531017+00:00'
context:
id: 01J40114CB126SPCWT4G0CK240
parent_id: null
user_id: null
id: t_close_5
idx: '11'
alias: null
for:
__type: <class 'datetime.timedelta'>
total_seconds: 0
description: sun.sun via template
I’m loving this blueprint, it made my life so much easier as I wanted to deal with 10 covers but was not sure how to make them all work properly…
I’ve been using this for some days but I’m not sure I understand the override manual feature.
I activate the override feature for open/close/shading (I don’t use ventilation) as I understood that this makes the next action skip if there was a manual movement. Correct?
This morning I manually moved the cover at 8:19 but then it automatically shaded at 8:30 (override manual reset should be after 60 minutes).
When I made a manual movement, the helper changed to:
{"open":{"a":true,"t":1722320349},"close":{"a":false,"t":1721744960},"ventilate":{"a":false,"t":0},"shading":{"a":false,"t":1722229904},"locked":{"a":false,"t":0},"manual":{"a":true,"t":1722320349},"p":100,"v":4,"t":1722320349}
Then changet to the below when the shading started, just 11 minutes later
{"open":{"a":true,"t":1722321014},"close":{"a":false,"t":1721744960},"ventilate":{"a":false,"t":0},"shading":{"a":true,"t":1722321014},"locked":{"a":false,"t":0},"manual":{"a":false,"t":1722320349},"p":100,"v":4,"t":1722321014}
Am I missing something or am I supposed to leave the override options disabled?
You can find the trace here, if needed
ps. just found out that my shading position was lower than closed position. Don’t know if this is related…
pps. probably the same as this issue
thank you!
The trigger template for this is:
value_template: '{{ state_attr(default_sun_sensor, ''elevation'') | float(default=sun_elevation_down) < sun_elevation_down }}'
so it’s < and not <=
Description is
description: The cover will be <ins>closed</ins> if the sun elevation is under this value
Automation is working as supposed to
did you create one helper by shutter ?
Yes I have 1 helper for each different cover. I can see that the helper changes when the cover moves to different positions and when there’s a manual intervention
I need the trace for the trigger “t_shading_start_1”.
Please read this for further informations:
Could it be that your status helper is wrong?
Have you created a helper for each automation? And is it really 254 characters long? Then isn’t that the problem?
Oh, then I was probably right with my assumption. Only just read your other post. Yes, a separate helper for each CCA automation. Otherwise it won’t work.
No, unfortunately it is not possible to read the values from other input entities.
It is also not possible to write the values externally within the automation.
There is already a ticket on GitHub in which a similar request was made.
I don’t understand the problem here.
That’s hardly relevant, is it? It would also be triggered at 6.01. And the values change every two minutes for me.
It’s also described in the documentation, isn’t it?
Just change your value to 5.99 if that’s important to you.
And it is even very important that it is “lesser than” (lt) and not “lesser than or equal” (lte). Because if the variable is not set, the default value would take effect and the condition would always be true. It is also important that we work with floats here and not with integers. Otherwise, 7 is identical to 7.01 and also to 7.5.
Well prepared. Good information. Thanks for the trace.
They will probably also be affected by the bug. I really have to fix it.
my work is customer service for industrial machinery so I know that precise and good information is the most useful part… I try my best to always be good at that
Thanks again for your work, I will send you a small gift as your work is really helping me out
ps. again: with the help of chatGPT I made a “translator” for the input_text entities that the automation creates… it makes is easier for me to keep track of what is going on, maybe it helps others too:
{%- set data = states('input_text.example') | from_json %}
{%- set true_icon = "✅" %}
{%- set false_icon = "❌" %}
open: {{ true_icon if data.open.a else false_icon }} ({{ data.open.t | timestamp_custom('%Y-%m-%d %H:%M:%S') }}),
close: {{ true_icon if data.close.a else false_icon }} ({{ data.close.t | timestamp_custom('%Y-%m-%d %H:%M:%S') }}),
ventilate: {{ true_icon if data.ventilate.a else false_icon }} ({{ data.ventilate.t | timestamp_custom('%Y-%m-%d %H:%M:%S') }}),
shading: {{ true_icon if data.shading.a else false_icon }} ({{ data.shading.t | timestamp_custom('%Y-%m-%d %H:%M:%S') }}),
locked: {{ true_icon if data.locked.a else false_icon }} ({{ data.locked.t | timestamp_custom('%Y-%m-%d %H:%M:%S') }}),
manual: {{ true_icon if data.manual.a else false_icon }} ({{ data.manual.t | timestamp_custom('%Y-%m-%d %H:%M:%S') }})
of course replace input_text.example with your entity.
The result is something like below
Hey, I was already thinking about making something like this today. Under FHEM there were samples of so-called readingsGroups back then.
But thank you very much for your feedback. You were quicker.
Post-holiday update
2024.07.31:
- Fixed: Override conditions were incorrect #109
- Fixed: Faulty timing triggers although they have been deactivated #104
- Fixed: Removed duplicate line of code without effect #105
- Fixed: Reset shading status at midnight that is no longer required - but still saved #106
- Fixed: Empty weather conditions are now taken into account when shading is ended #110
- Fixed: When the shading is ended, the resident sensor is now also checked so that nobody is woken up #116
- Updated: All force situations are now fully cross-checked in all choose-branches
- Added: Save the length of the helper for better debugging #107
- Added: The ventilation position can now be moved to after the sun shading has ended (if the contact is open)
Hi!
I’m afraid the override is still not working properly. I made a manual movement as a test this morning at 06:33 and the helper changed to:
{"open":{"a":true,"t":1722486783},"close":{"a":false,"t":1722419051},"ventilate":{"a":false,"t":0},"shading":{"a":false,"t":1722321014},"locked":{"a":false,"t":0},"manual":{"a":true,"t":1722486783},"p":100,"v":4,"t":1722486783}
at 07:01 the brightness value was high enough so shading started anyway (manual reset still set to 60min), the helper changed to:
{"open":{"a":true,"t":1722488495},"close":{"a":false,"t":1722419051},"ventilate":{"a":false,"t":0},"shading":{"a":true,"t":1722488495},"locked":{"a":false,"t":0},"manual":{"a":false,"t":1722486783},"p":100,"v":4,"t":1722488495}
Here the trace too, if needed.
shouldn’t the condition
- or:
- '{{ not is_cover_helper_manual }}'
- '{{ not override_shading_after_manual }}'
- '{{ is_cover_helper_manual and override_shading_after_manual }}'
be
- or:
- '{{ not is_cover_helper_manual }}'
- '{{ not override_shading_after_manual }}'
- '{{ is_cover_helper_manual and not override_shading_after_manual }}'
?
One more question, sorry for bothering!
The resident sensor state prevents the shading IN/OUT if true, correct? That actually worked this morning but then nothing happened when the sensor turned to false as my wife woke up. I thought that would have started shading but I think this is not a trigger in the blueprint. The only trigger related to the state of the resident sensor is t_open_6 or t_close_6 so I guess those open/close the covers only. Is there a workaround to make also the shading start when the sensor changes and the conditions are true for shading?
Thanks again!