Light only will adjust brightness unless color is also specified

I have a lightbulb that is using the V of an HSV to set brightness and is causing me a ton of pain. Overall, I can set a color to the light without issue, I can set color + brightness without issue, but when I try to set ONLY brightness, then things will not work with the light.

Given the way that HA works with the light component, it doesn’t really account for the ability to pass a brightness percentage AND the color to the lights, as when I am editing a brightness percentage, it will only pass the brightness percentage to the light, and the light refuses to do anything with that.

As a workaround/hack, I was thinking of maybe setting a numeric helper from 1-100, and then an automation whenever that number changes to send a command to the light with a templated value of the HS or RGB color of what the light currently is, plus the desired brightness being the numeric helper. I feel like I am almost there, but not quite. Problem that I am facing here is that you can call many more options in a service call to light.turn_on via the developer tools > services menu, but in the automation, you are only limited to a few options.

This will work with my light:

service: light.turn_on
data:
  rgb_color: [10,10,10]
  brightness_pct: 11
target:
  entity_id: light.white_noise_machine

But then when I try to pull those values in a template - which I need to do since that’s the whole point of this automation - it silently fails:

service: light.turn_on
data:
  rgb_color: '{{ state_attr('light.white_noise_machine','rgb_color') | list }}'
  brightness_pct: 11
target:
  entity_id: light.white_noise_machine

Any ideas or other ways around this issue?

I wonder if it has to do with using single quotes twice in the same line. Does this make any difference?

rgb_color: >-
  {{ state_attr('light.white_noise_machine','rgb_color') | list }}

Thanks - it was pesky quotes!

This works:

service: light.turn_on
data:
  rgb_color: "{{ state_attr('light.white_noise_machine','rgb_color') | list }}"
  brightness_pct: "{{ states('input_number.white_noise_brightness') | int }}"
target:
  entity_id: light.white_noise_machine

I’d love to find a way for the sliders on the actual light entity to work, so if anyone else has other ideas, please let me know!