[HELP]New Fan Integration

How to use new percentage mode mqtt fan integration ?
I’ve tried below config , it works for on/off but i can’t change speed
it sends low/mid/high instead of numbers/percentage

- platform: mqtt
  name: "Bedroom Fan"
  state_topic: "stat/bedroom_fan/RESULT"
  state_value_template: "{{ value_json.POWER }}"
  command_topic: "cmnd/bedroom_fan/POWER"
  availability_topic: "tele/bedroom_fan/LWT"
  speed_state_topic: "stat/bedroom_fan/RESULT"
  speed_command_topic: "cmnd/bedroom_fan/Dimmer"
#  percentage_template: "{{ value_json.Dimmer }}"
#  set_percentage: 100
  qos: 0
  payload_on: "ON"
  payload_off: "OFF"
  payload_available: "Online"
  payload_not_available: "Offline"    

developer menu -

i also tried to use service

service: fan.set_percentage
  percentage: 32
  entity_id: fan.bedroom_fan

but throwing error Failed to call service fan/set_percentage. sequence item 0: expected str instance, Optional found

Home Assistant Core 2021.3.0b2

what am i missing ?
its king-art dimmer , flashed with tasmota

From what I can tell looking at the latest core/mqtt/fan code…the percentage feature is not implemented yet, although in one of the release notes, it states that by the end of 2021, all fan entities will need to use percentage instead of speed. Sounds like this is a work in progress. I know, I am about to do a very large mqtt / fan integration on 3 homes and all my fans are wifi and support 8 speeds, yet mqtt is only at 3. Someone tried doing a pull request to change it, and it was closed by the dev’s in favor of percentage.

Here is the code in question —


1 Like