summaryrefslogtreecommitdiffstats
path: root/custom/scripts/turn-on-office-lights.yaml
blob: f9615a00c03ea58525931fe6e979abaf1bfab282 (plain)
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
26
27
28
29
30
turn_on_office_lights:
  alias: Turn On Office Lights
  description: Turn on office bulb & turn off upper lights
  fields:
    temperature:
      name: Temperature
      description: "Temperature (Kelvin)"
      default: 4500
      selector:
        number:
          min: 2000
          max: 6500

  variables:
    temp: "{{ temperature | default(4500) | float }}"

  mode: single

  sequence:
    - parallel:
      - service: light.turn_on
        data:
          brightness_pct: 100
          kelvin: "{{ temp }}"
        target:
          entity_id: light.yeelight_color_0x7caaf86
      - service: homeassistant.turn_off
        data: {}
        target:
          entity_id: switch.lights_living_lustre