hi,
i’m trying to implement the mqtt_template light entity but stumble upon some problems.
First not a really big problem:
When i change the color my led strip changes color the right callback is done but the icon in the interface doesn’t change until i reload the webpage.
Second: when i click on the light there isn’t a slider for the brightness. If i change the css in chrome so i can see the slider and use it, it works, but it won’t show.
If i check in developer tools states i see that the light doesn’t have any supported_features is that normal?
my configuration is like this:
- platform: mqtt_template
name: "Kast LEDs2"
effect_list:
- Rainbow
- Solid
command_topic: "hass/secondstrip/setpower"
state_topic: "hass/secondstrip/setpowerpub"
command_on_template: >
{"state": "on"
{%- if brightness is defined -%}
, "brightness": {{ brightness }}
{%- endif -%}
{%- if red is defined and green is defined and blue is defined -%}
, "color": [{{ red }}, {{ green }}, {{ blue }}]
{%- endif -%}
{%- if effect is defined -%}
, "effect": "{{ effect }}"
{%- endif -%}
}
command_off_template: '{"state": "off"}'
state_template: '{{ value_json.state }}'
brightness_template: '{{ value_json.brightness }}'
red_template: '{{ value_json.color[0] }}'
green_template: '{{ value_json.color[1] }}'
blue_template: '{{ value_json.color[2] }}'
effect_template: '{{ value_json.effect }}'