Have a light set as the following (it’s a mysensors mqtt dimmer). I believe it was working fine before but now when i change the slider for brigtness i have HA send two values at the same time - the payload_on and brightess_scale.
I’m not sure i want to separate the switch and brightness topics on arduino side. And it was working before.
Yes exactly. Yo have a rare talent of finding the requests on github. It was working on ver 0.33 so i guess there were some pull requests merged changing the behaviour.
I manged to get an mqtt_template config working as a workaround. But it is a workaround…
- platform: mqtt_template
name: kitchen_tv
command_topic: "mys-in/71/1/1/0/3"
state_topic: "mys-out/71/1/1/0/3"
state_template: "{%- if value| int > 0 -%} on {%- else -%} off {%- endif -%}"
brightness_template: '{ value / 100 * 255 }' # required so light has brightness option
command_off_template: '0'
command_on_template: >
{%- if brightness is defined -%}
{{ (brightness / 255 * 100) | int }}
{% else %}
100
{%- endif -%}