Tasmota + sonoff bs-sz01 light . brightness is alway 255 in hassio

Hi,

I try to setup mqtt light with brigtnes using sonoff bn-sz01 + tasmota. All is working brightnes + light but
under states in hass brightens is allways 255? Why?

mqtt light settings:
- platform: mqtt
name: “mqtt_light_hallway”
command_topic: “cmnd/sonoff_bn-sz01_01/POWER”
state_topic: “stat/sonoff_bn-sz01_01/POWER”
availability_topic: “tele/sonoff_bn-sz01_01/LWT”
qos: 1
payload_on: “ON”
payload_off: “OFF”
payload_available: “Online”
payload_not_available: “Offline”
retain: true
brightness_command_topic: “cmnd/sonoff_bn-sz01_01/DIMMER”
brightness_state_topic: “stat/sonoff_bn-sz01_01/DIMMER”
# brightness_value_template: “{{ value_json.brightness }}”
brightness_scale: 100
optimistic: false

Nobody have this problem? I wanna graph level of brightness in grafana but I can’t becouse in hassio under states brightenes is always 255.

don’t know the device but going off other sonoff devices I have you may need to correct brightness_state_topic to the following

brightness_state_topic: “stat/sonoff_bn-sz01_01/RESULT”

and maybe uncomment brightness_value_template?

Thanks @PeteCondliffe now is working.

  - platform: mqtt
    name: "mqtt_light_hallway"
    command_topic: "cmnd/sonoff_bn-sz01_01/POWER"
    state_topic: "stat/sonoff_bn-sz01_01/POWER"
    availability_topic: "tele/sonoff_bn-sz01_01/LWT"
    qos: 1
    payload_on: "ON"
    payload_off: "OFF"
    payload_available: "Online"
    payload_not_available: "Offline"
    retain: true
    brightness_command_topic: "cmnd/sonoff_bn-sz01_01/DIMMER"
    brightness_state_topic: "stat/sonoff_bn-sz01_01/RESULT"
    brightness_value_template: "{{ value_json.Dimmer }}"
    brightness_scale: 100
#    optimistic: false
1 Like