Hello everyone, I’ve been learning HASS/Node-RED fast enough to migrate all of my SmartThings/WebCoRE automations to HA, but I’m still far behind in understanding how YAML works and how it is supposed to be written. I’m mostly copying and pasting stuff and checking if it works :S
When I first started, I created some template lights, because I just needed “virtual dimmer” devices with “brightness” control (which are not really lights, they are just variables that I can set using Google Assistant).
They look like this in the configuration.yaml file:
light:
next_wash_cycle:
friendly_name: Next Wash Cycle
turn_on:
turn_off:
color_template: "({{states('input_number.h_input') | int}}, {{states('input_number.s_input') | int}})"
set_level:
Now I was going a bit deeper and I needed to create an RGB virtual light with color temperature setting too, so I installed Virtual Components and created that other light in the configuration.yaml:
light:
- platform: virtual
living_ceiling_light:
name: 'Living Ceiling Light'
initial_value: 'on'
support_brightness: true
initial_brightness: 100
support_color: true
initial_color: [0,255]
support_color_temp: true
initial_color_temp: 255
support_white_value: true
initial_white_value: 240
initial_availability: true
After creating this, I noticed that the first lights disappeared, and Studio Code Server says “duplicate key” to the right of “light:”, but I can’t find a way to “mix” these two different types of virtual lights into the same structure.
Could anyone point me on the best direction to go here? Should I ditch any of these methods and use only one? Is it possible to keep them both together?
Thank you!
R.