Trying to create an automation to switch on a light during specific weather conditions using openweather API integration.
If I add all the triggers in 1 automation will this work? Will it trigger if any of these occur? (rain/fog/lightning/)
- id: '1630350392832'
alias: Rain/Fog lights on
description: ''
trigger:
- platform: state
entity_id: sensor.openweathermap_forecast_condition
to: Mist
- platform: state
entity_id: sensor.openweathermap_condition
to: fog
- platform: state
entity_id: sensor.openweathermap_condition
to: pouring
- platform: state
entity_id: sensor.openweathermap_condition
to: rainy
- platform: state
entity_id: sensor.openweathermap_condition
to: lightning
- platform: state
entity_id: sensor.openweathermap_forecast_condition
to: lightning-rainy
condition:
- condition: sun
before: sunrise
after: sunset
action:
- service: switch.turn_on
target:
entity_id: switch.03052672ecfabc4350f1
mode: single