Hi,
I am new with Home Assistant and was playing around with it since a couple of weeks. I have now my first automation running, basically it does what it should but I am not sure if I could do it better.
Initual Situation:
I have a roof with with a sleeping room directly below it. The room is equiped with a Velux Roof Window. The window can be remote controled, as well as the roller shutter.
In addition to that I have a weather station which is connected to WUnderground and delivers the outside temperature and the solar radiation.
To keep the temperature in the room as low as possible I want to automatically close the shutter, when the solar radiation is above a certain level (for at least 15 minutes) and the outside temperature is higher then a certain level.
The shutter should open again either at 6pm or when the solar radiation is below a threshold (for 15 minutes).
My config basically works, but has one minor problem: When the shutter are closed and the solar radiation goes below the threshold for less then 15 minutes, and then goes up again for 15 minutes, then the “Closing Automation” is again triggered, although not neccessary. It has no real impact, but not sure if this can be opimized.
This is my automation.config:
- id: '1525074202648'
alias: Sonne-da
trigger:
- entity_id: sensor.solrad
for:
minutes: 15
platform: state
to: 'True'
- above: '18.0'
entity_id: sensor.pws_temp_c
platform: numeric_state
condition:
- condition: and
conditions:
- condition: state
entity_id: sensor.solrad
state: 'True'
for:
minutes: 15
- condition: numeric_state
entity_id: sensor.pws_temp_c
above: '18.0'
- condition: time
before: '18:00:00'
action:
- data:
message: Es scheint die Sonne!
service: notify.cisco_webex_team
- data:
message: Es scheint die Sonne!
title: HA - Es scheint die Sonne
service: notify.gmail
- data:
data:
push:
category: alarm
message: Es scheint die Sonne!
service: notify.ios_iphonejohannes
- data:
entity_id: scene.beschattungein
service: scene.turn_on
- id: '1525074202649'
alias: Sonne-weg
trigger:
- entity_id: sensor.solrad
for:
minutes: 15
platform: state
to: 'False'
- at: '18:00'
platform: time
condition: []
action:
- data:
message: Es scheint keine Sonne mehr!
service: notify.cisco_webex_team
- data:
message: Es scheint keine Sonne mehr!
title: HA - Es scheint keine Sonne mehr
service: notify.gmail
- data:
data:
push:
category: alarm
message: Es scheint keine Sonne mehr!
service: notify.ios_iphonejohannes
- data:
entity_id: scene.beschattungaus
service: scene.turn_on
- The first “id” is for closing, the second one for opening
- sensor.solrad is the solar radiation
- sensor.pws_temp_c is the outside temperature
- I have three notification items, but only for testing different options
- the scenes are for controlling the shutter
Any input is highly welcome.
Br,
Johannes