I’ve got the Aqara gateway that’s plugged in outside my bedroom. I’d like to light this up blue if it’s going to rain and red if it’s going to be hot. For weekdays, it makes sense for it to be 5:30-7:30, however, during weekends, it would need to be delayed by a few hours.
Is there a cleaner way to do both cases in one automation? What about turning it off after a few hours? I guess that in the worst case scenario I have 6 separate automations.
- alias: Aqara Rain Light ON WEEKDAY
trigger:
platform: time
at: '05:30:00'
condition:
- condition: and
conditions:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
- condition: state
entity_id: group.all_devices
state: 'home'
- condition: template
value_template: '{{ states.sensor.dark_sky_precip_probability.state | float > 50 }}'
- condition: template
value_template: '{{ states.sensor.dark_sky_precip_intensity.state | float > 0.001 }}'
action:
- service: light.turn_on
data:
entity_id: light.gateway_rgb
brightness_pct: 25
rgb_color: [0,63,255]