Automation: Use_trigger_values


Basic example for use_trigger_values

Turn on lights during daytime when it’s dark enough < 200 lux.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
automation:
  - alias:
    trigger:
      - platform: numeric_state
        entity_id: sensor.sensor_luminance
        below: 200
      - platform: time
        after: "08:00"
        before: "23:00"
    condition: use_trigger_values
    action:
      service: homeassistant.turn_on
      entity_id: group.basic_lights

automation 2:
  - alias:
    trigger:
      - platform: numeric_state
        entity_id: sensor.sensor_luminance
        above: 200
      - platform: time
        after: "23:00"
    action:
      service: homeassistant.turn_off
      entity_id: group.basic_lights