summaryrefslogtreecommitdiffstats
path: root/custom/scripts/turn-on-office-lights.yaml
blob: 9520db08d891a3fe938ff2f2b1c14eda2648a18f (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
31
32
33
34
35
36
37
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.office_bulb_office_bulb
            - light.office_led_office_led
      - service: homeassistant.turn_off
        data: {}
        target:
          entity_id: 
            - switch.lights_living_lustre
            - light.office_chair_led_office_chair_led
            - switch.living_tablelampsocket