Dear All,
I made an automation for my awning to lower it during sunny days. Despite my basic knowledge of YAML, I think it turned out well and I am satisfied with it.
Today I was at home and noticed that the screen was constantly shuttling open-close-open-close. I noticed that there were quite a few clouds. And indeed when there was a cloud it went up and when the cloud was gone it went down again.
Now I would like to extend my automation with the condition that if there are clouds then the screen will not go down.
I installed the BUIENRADAR integration and I saw that you can use PARTLY CLOUDY and CLOUDY for that.
Despite searching on Google I didn’t get any further than trial and error…I can’t figure out how you can do that.
Who wants to take me step-by-step to include this as a condition in my automation?
- id: 'Screens_naar_beneden'
alias: Screens naar beneden
description: ''
trigger:
- platform: time_pattern
minutes: '/5'
seconds: 0
- platform: numeric_state
entity_id: sensor.buienradar_irradiance
above: 350
for:
minutes: 10
condition:
condition: and
conditions:
- condition: time
after: '07:30:00'
before: '14:00:00'
- condition: numeric_state
entity_id: sensor.buienradar_wind_force
below: 6
- condition: numeric_state
entity_id: sensor.buienradar_precipitation
below: 0.1
#Sensor at the top of the screen -> Check if screen is open or closed
- condition: state
entity_id: binary_sensor.screen_sensor_up_down
state: 'off'
- condition: numeric_state
entity_id: sensor.buienradar_irradiance
above: 350
action:
- service: scene.turn_on
target:
entity_id: scene.screens_naar_beneden
- service: notify.henk
data:
title: 'Screens gaan omlaag!'
message: 'Dat zeg ik...'
data:
clickAction: "noAction"
mode: restart
- id: 'Screens_naar_boven'
alias: Screens naar boven
description: ''
trigger:
- platform: time
at: '14:15:00'
- platform: numeric_state
entity_id: sensor.buienradar_wind_force
above: 6
- platform: numeric_state
entity_id: sensor.buienradar_precipitation
above: 0.1
- platform: numeric_state
entity_id: sensor.buienradar_irradiance
below: 300
for:
minutes: 30
condition:
#Sensor at the top of the screen -> Check if screen is open or closed
- condition: state
entity_id: binary_sensor.screen_sensor_up_down
state: 'on'
for: "00:00:10"
action:
- service: scene.turn_on
target:
entity_id: scene.Screens_naar_boven
- service: notify.family
data:
title: 'Screens gaan omhoog!'
message: 'Dat zeg ik...'
data:
clickAction: "noAction"
- wait_for_trigger:
#Sensor at the top of the screen -> Check if screen is open or closed
- platform: state
entity_id: binary_sensor.screen_sensor_up_down
from: 'on'
to: 'off'
timeout:
seconds: 60
continue_on_timeout: true
- if:
#Sensor at the top of the screen -> Check if screen is open or closed
- condition: state
entity_id: binary_sensor.screen_sensor_up_down
state: 'on'
then:
- service: notify.henk
data:
title: ⚠️ Probleem ⚠️
message: >
Er is een probleem met de screens!
Het scherm is niet boven aangekomen.
Komt de sensor wel binnen?
Batterij leeg?
Vastgelopen in de rails?
data:
clickAction: "noAction"
mode: restart