Hello!
I’ve just started using Home Assistant and bought 3 fibaro switches to get me started.
Everything works but i have a fealing that my automations could be simpler.
Maybe somebody can check out my automations and help me out?
This is my first automation: Turn on the lights 1 hour before sunset(works).
- alias: "Lights: Turn on at sun set"
action:
entity_id: group.living_room
service: switch.turn_on
trigger:
event: sunset
platform: sun
offset: "-01:00"
This automation turns off the light (works)
- alias: "Lights: Turn off at midnight"
action:
entity_id: group.living_room
service: switch.turn_off
trigger:
- platform: time
at: '22:30'
This automation should turn on the light when (not really efficient i think, but works):
Cloud coverage is above 80%, devices are home, it’s after 09:00 o’clock and when it’s raining.
- alias: 'Lights: Dark Day'
trigger:
- platform: numeric_state
entity_id: sensor.dark_sky_cloud_coverage
above: 80
condition:
condition: and
conditions:
- condition: state
entity_id: group.devices_tracker
state: 'home'
- condition: time
after: '09:00'
- condition: sun
before: 'sunset'
- condition: numeric_state
entity_id: sensor.dark_sky_precip_intensity
above: '0.5'
action:
service: switch.turn_on
entity_id: group.living_room
This automation should turn off every light when:
Cloud coverage is under 80%, when it’s after 09:00 o’clock and 1 hour before sunset(because i already have a automation for the sunset and don’t want to interfere that ^)
- alias: 'Lights: Dark day is over'
trigger:
- platform: numeric_state
entity_id: sensor.dark_sky_cloud_coverage
below: 80
condition:
condition: and
conditions:
- condition: time
after: '09:00'
- condition: sun
before: 'sunset'
before_offset: "1:01:00"
action:
service: switch.turn_off
entity_id: group.living_room
Love to hear what you guys think or what i have to change to make it more efficient.