Hello, I want to set the color button with a created sensor to get and format to a string the last RGB value sent by a light.
Button card :
type: custom:button-card
entity: switch.table_pixel_1
icon: none
show_name: false
styles:
card:
- color: white
state:
- value: 'on'
styles:
card:
color: >
[[[
return 'states['sensor.table_color_rgb'].state';
]]]
Sensor Created :
Thanks for your help