Hi,
I just got my Shelly Dimmers installed and I want to integrate them with HA using MQTT.
I can’t for the life of me figure out how to change the brightness via mqtt.
I’ve managed to turn it on and off but that’s it.
It is the template things that I don’t quite understand.
This is the config I have so far:
- platform: mqtt
name: Shelly Dimmer
state_topic: "shellies/shellydimmer-XXXXXX/light/0"
command_topic: "shellies/shellydimmer-XXXXXX/light/0/command"
brightness_state_topic: "shellies/shellydimmer-XXXXXX/light/0/status"
brightness_command_topic: "shellies/shellydimmer-XXXXXX/light/0/status"
state_value_template: "{{ value_json.state }}"
brightness_value_template: "{{ value_json.brightness }}"
brightness_scale: 100
payload_on: "on"
payload_off: "off"
I can turn on/off the lights in HA but when I change the brightness it just sends the value direclty to shellies/shellydimmer-XXXXXX/light/0/status
and not in the JSON format.
The value in the topic is this:
{"ison":true,"mode":"white","brightness":100}
I only need to change the value for brightness but obviously have no idea how to do that.
I understand I need to use the template settings but even after reading through the template docs and Shelly Dimmer documentaion multiple times I still can’t figure it out.
Is there anyone that has this working and knows how to configure this correctly?
Thanks,
-Patric