I used to have this working using data templates for years and something broke over the past several months, I think it has to do with the revamping of RGBW control.
When the white brightness on the lights change, it updates the level on the switch. And when the level on the switch is changed, it updates the white brightness.
I understand data_template is now gone, so far I’m having trouble with this portion for the action:
service: light.turn_on
data:
rgbw_color_template:
- 0
- 0
- 0
- "{{ state_attr(\"light.kitchen_counter_sw\"), \"brightness\" }}"
target:
entity_id: light.kitchen_counter
However it results in the following error:
2022-12-25 08:51:43.714 ERROR (MainThread) [homeassistant.components.automation.kitchen_counter_light_on] Kitchen Counter Light On: Error executing script. Invalid data for call_service at pos 2: extra keys not allowed @ data[‘white_value’]
2022-12-25 08:51:43.720 ERROR (MainThread) [homeassistant.components.automation.kitchen_counter_light_on] Error while executing automation automation.kitchen_counter_light_on: extra keys not allowed @ data[‘white_value’]
What do I need to change? There has been a drastic change in the syntax since I first had this working.