Skip to content

Changing the hours of light in HA automations

I wanted the lights above my kitchen counter to light up faster in the evening and later in the morning, I did it this way:

- alias: Kitchen_leds_on
  initial_state: true
    platform: state
    entity_id: binary_sensor.motion_sensor_158d00031c90e3
    from: 'off'
    to: 'on'
    condition: or
      - condition: numeric_state
        entity_id: 'sensor.illumination_34ce00fb6930'
        below: 100
      - condition: time
        after: '19:00:00'
      - condition: sun
        after: sunset
        after_offset: '-01:00:00'
      - condition: sun
        before: sunrise
        before_offset: '01:00:00'
    service: light.turn_on
    entity_id: light.kitchen_leds

Comments are closed, but trackbacks and pingbacks are open.