MQTT payload_on/off to a number

Hello,

I’m trying to automate my blinds. I wrote an Arduino sketch, however I can’t manage to make Hass.io send the “ON” or OFF paylaod to “100” or “0”.

  - platform: mqtt
name: "shades"
command_topic: "cmnd/shades/Dimmer"
state_topic: "tele/shades/STATE"
brightness_command_topic: "cmnd/shades/Dimmer"
brightness_state_topic: "tele/shades/STATE"
brightness_scale: 100
payload_on: "100"
payload_off: "0"

Hass.io still sends “ON” as the “ON” command and not “100”. When using the brightness slider in Hass.io it sends the Dimmer value from 0 to 100, however if I press the ON Button in Hass.io it just sends “ON” and not “100”.
I’m using brightness for adjusting the height of my blinds. So 0 would be up and 100 would be completly down.
Any ideas?

Thanks
Chris

Try removing payload_on and payload_off and using the on_command_type option set to brightness.

- platform: mqtt
  name: "shades"
  command_topic: "cmnd/shades/Dimmer"
  state_topic: "tele/shades/STATE"
  brightness_command_topic: "cmnd/shades/Dimmer"
  brightness_state_topic: "tele/shades/STATE"
  brightness_scale: 100
  on_command_type: brightness