View difference between Paste ID: Xug3kBxy and YybMEQ4j
SHOW: | | - or go back to the newest paste.
1
light:
2
  - platform: template
3
    lights:
4
      rgbw:
5
        friendly_name: "rgbw"
6-
        rgbw_template: (
6+
        rgbw_template: |-
7-
          {{ state_attr('light.kwadrat_kuchnia_red', 'brightness')  }},
7+
          {{ [
8-
          {{ state_attr('light.kwadrat_kuchnia_green', 'brightness') }},
8+
             state_attr('light.kwadrat_kuchnia_red', 'brightness'),
9-
          {{ state_attr('light.kwadrat_kuchnia_blue', 'brightness') }},
9+
             state_attr('light.kwadrat_kuchnia_green', 'brightness'),
10-
          {{ state_attr('light.kwadrat_kuchnia_white', 'brightness') }}
10+
             state_attr('light.kwadrat_kuchnia_blue', 'brightness'),
11-
          )
11+
             state_attr('light.kwadrat_kuchnia_white', 'brightness') 
12
          ] }}
13
        turn_on:
14
          service: light.turn_on
15
          entity_id: light.kwadrat_kuchnia_red, light.kwadrat_kuchnia_green, light.kwadrat_kuchnia_blue, light.kwadrat_kuchnia_white
16
        turn_off:
17
          service: light.turn_off
18
          entity_id: light.kwadrat_kuchnia_red, light.kwadrat_kuchnia_green, light.kwadrat_kuchnia_blue, light.kwadrat_kuchnia_white
19
        set_rgbw:
20
          service: script.kwadrat_set_rgbw
21
          data:
22-
            rgbw_color:
22+
            r: "{{r}}"
23-
              - "{{ r }}"
23+
            g: "{{g}}"
24-
              - "{{ g }}"
24+
            b: "{{b}}"
25-
              - "{{ b }}"
25+
            w: "{{w}}"
26-
              - "{{ w }}"
26+
27
28
script:
29
  kwadrat_set_rgbw:
30
    sequence:
31
      - service: light.turn_on
32
        data:
33
          entity_id: light.kwadrat_kuchnia_red
34
          brightness: "{{r}}"
35
      - service: light.turn_on
36
        data:
37
          entity_id: light.kwadrat_kuchnia_green
38
          brightness: "{{g}}"
39
      - service: light.turn_on
40
        data:
41
          entity_id: light.kwadrat_kuchnia_blue
42
          brightness: "{{b}}"
43
      - service: light.turn_on
44
        data:
45
          entity_id: light.kwadrat_kuchnia_white
46
          brightness: "{{w}}"