Hello,
Since the last update, one of my mqtt light configuration isn’t working anymore.
I tried to change the value_template to state_value_template as described in the documentation but still get an error.
Here is the configuration:
- state_topic: "tele/rled3/STATE"
schema: template
name: "Bandeau"
unique_id: "rled3"
command_topic: "cmnd/rled3/Backlog"
command_on_template: >-
{%- if state is defined -%}
Power0 1;
{%- endif -%}
{%- if brightness is defined -%}
Dimmer1 {{ (brightness / 2.55) | int }};
{%- endif -%}
{%- if red is defined and green is defined and blue is defined -%}
Color2 {{ "%02X" | format(red | int) }}{{ "%02X" | format(green | int) }}{{ "%02X" | format(blue | int) }}=;
{%- endif -%}
{%- if white_value is defined -%}
White {{ (white_value / 2.55) | int }};
{%- endif -%}
State
command_off_template: "Power0 0; State"
state_template: '{% if value_json.POWER1 == "ON" or value_json.POWER2 == "ON" %}on{% else %}off{% endif %}'
brightness_template: '{{ (value_json.Dimmer1 * 2.55) | int }}'
red_template: '{{ value_json.Color[0:2] | int(base=16) }}'
green_template: '{{ value_json.Color[2:4] | int(base=16) }}'
blue_template: '{{ value_json.Color[4:6] | int(base=16) }}'
state_value_template: '{{ (value_json.White * 2.55) | int }}'
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
Any idea how I can fix this “Invalid config for [mqtt]: [state_value_template] is an invalid option for [mqtt]. Check: mqtt->mqtt->light->8->state_value_template” error?