Heho
I’m breaking my brain while figuring out how to use the template light entity. Normaly I only need a color wheel card and a slider, but I can’t find any color wheel so I need to go via light entity.
I want to control a light which react on 4 input_number values.
washer_dimmer 0-255
washer_red 0-255
washer_green 0-255
washer_blue 0-255
The template light should only set this values and should not be able to turn something on or off.
light:
- platform: template
lights:
washers:
friendly_name: washer
unique_id: washerlight_combined
value_template: "{{ states('switch.eve_energy_20ecl1301_2')}}"
level_template: "{{ states('input_number.washer_dimmer')|int }}"
rgb_template: "({{ states('input_number.washer_red') | int}} , {{ states('input_number.washer_green') | int }}, {{ states('input_number.washer_blue') | int }})"
turn_on:
action: script.deadscript
data:
value: 1
turn_off:
action: script.deadscript
data:
value: 0
set_rgb:
- action: input_number.set_value
data:
value: "{{ brightness }}"
entity_id: input_number.washer_dimmer
set_level:
- action: input_number.set_value
data:
value: "{{ r }}"
entity_id: input_number.washer_red
- action: input_number.set_value
data:
value: "{{ g }}"
entity_id: input_number.washer_green
- action: input_number.set_value
data:
value: "{{ b }}"
entity_id: input_number.washer_blue
This is my test template, but it does not work.
The deadscript is an empty script without any function.
If I use the light entity I always get this error message:
expected float for dictonary value @ data['value']
Do you know what mistake I made?