Template-ing Format question

Hey, all.
I am trying to harvest the dynamic states of Hue scenes to coordinate some changes in non-Hue lights when scenes are changed using Hue-Official stuff.

Here’s the question:
How do I make this template true?

{{state_attr('light.hue_lr_light_box', 'xy_color') == 'THE COLOR'}}

Where the color is a specific XY value.

The output of the desired state is this:

[
  0.1915,
  0.3638
]

But I can’t seem to get it to be true.

{{state_attr('light.hue_lr_light_box', 'xy_color') == '0.1915,  0.3638'}} = false
{{state_attr('light.hue_lr_light_box', 'xy_color') == 0.1915,  0.3638}} = false,  0.3638
{{state_attr('light.hue_lr_light_box', 'xy_color') == '[  0.1915,  0.3638  ]'}} = false

And many others.

What am I missing? where do these dashes and stuff go?

ha ha solved it

{{ state_attr('light.hue_lr_light_box', 'xy_color') == (0.1915, 0.3638)}} = true

Alternatively:

{{ is_state_attr('light.hue_lr_light_box', 'xy_color', (0.1915, 0.3638)) }} 
1 Like