I trying to setup a automation where I use weather conditions to control lights on / off.
How ever I have succeeded but only with one weather condition in one automation.
What I want is to have more than one state, like, cloudy, rainy - for light on.
I dont want to have one automation for each weather conditions…
see under:
alias: test
description: ''
trigger:
- minutes: /1
platform: time_pattern
condition:
- condition: and
conditions:
- after: sunrise
before: sunset
condition: sun
- condition: state
entity_id: device_tracker.mm
state: home
- condition: state
entity_id: weather.hjemme
state: cloudy
action:
- entity_id: light.dimmable_light_1
service: light.turn_on
Ugh - having trouble doing the same thing… can someone kindly help?
This is what I have so far:
- alias: "PORCH - on when rainy"
trigger:
- platform: state
entity_id: sun.sun
to: 'above_horizon'
condition:
- condition: state
entity_id: weather.home
state: 'rainy'
action:
service: switch.turn_on
entity_id: switch.10....
But, I keep seeing this error:
Invalid config for [automation]: Unexpected value for condition: 'None'. Expected numeric_state, state, sun, template, time, zone, and, or, not, device @ data['condition'][0]. Got None. (See /config/configuration.yaml, line 13).