I have an RF controlled ring light in my studio, I want HA to control it.
I’ve created a template light:
ringlight:
friendly_name: "Studie Ringlys"
turn_on:
- service: remote.send_command
data:
entity_id: remote.office_sender
device: ringlight
command: toggle
turn_off:
- service: remote.send_command
data:
entity_id: remote.office_sender
device: ringlight
command: toggle
set_temperature:
service: remote.send_command
data_template:
entity_id: remote.office_sender
command: >
{% if temperature | int < 33%}
coldwhite
{% elif temperature | int >=33 and brightness | int < 66%}
warmwhite
{% else %}
verywarmwhite
{% endif %}
device: ringlight
icon_template: mdi:camera-iris
Unfortunately the remote does not have an on/off, only a toggle.
The light has color and whites, and for now I just want the whites to be controlled.
I have cold, warnwhite, verywarmwhite defined as remote commands.
Being an RF433 light there is no reporting back, so all is ‘optimistic’
I tried doing the above, the idea was that it could translate a value for temperature into these three discreet levels, but that doesn’t work, ‘temperature’ is unknown. So what to do?
command: >
{% if color_temp | int < 1000}
coldwhite
{% elif color_temp | int >=1000 and brightness | int < 2000}
warmwhite
{% else %}
verywarmwhite
{% endif %}
got me a new error:
Invalid config for 'template' from integration 'light' at light.yaml, line 34: template value should be a string for dictionary value 'lights->ringlight
>set_temperature->0->data_template', got None
I also tried enclosing color_temp in {{}} but that didn’t help
That is very nice, of course as soon as it goes ‘out of sync’ with on/off state, all hell breaks loose, but I’m trying to find out if I can measure the powerdraw, and make an assumption from that if it is on or off, but at least now I can make sure the ringlight is set properly when I set up studio lights here, thankyou!