MQTT fan warm-up time feature

I have single-phase 230V bathroom fans that are regulated by 0-10V fan speed controllers.

They are defined like this:

    - unique_id: bathroom_exhaust_fan
      percentage_state_topic: "bathroom/exhaust_fan/state"
      percentage_command_topic: "bathroom/exhaust_fan/set"
      command_topic: "bathroom/exhaust_fan/set"
      payload_on: "10000"
      payload_off: "0"
      speed_range_min: 100
      speed_range_max: 10000

Speed range is in 1-10V.

The problem:
Fan will not always start when minimum speed is set. This is due to some dust that gets into it’s bearing.

I would like to have an additional warmup_time: 5s variable, that will set speed_range_max to command topic for first 5s, and then revert back to speed set from UI.

It partially works with my configuration - “payload_on” is sent first, and then I can setup target speed from UI, what is missing that that target speed should be sent after warmup time.

You are going to have a hard time getting core to change a integration like that for something you could easily build with a script you could call.
Turn on fan 100%, delay 5 seconds, set fan speed to whatever speed was passed in as data on the service call…

I have not written any script for hass yet, but I have feeling that this is not that easy.
This script should block user input for speed changes for 5s. It should block UI update too, so if user sets fan speed to 60% he/she should not see 100% for 5s.

Without that user experience will be terrible.

alias: test fan speed
sequence:
  - type: turn_on
    device_id: bd6180dda576fa063bf35daa23f06742
    entity_id: 6df36abea17c75e7fe57682f986c5821
    domain: fan
  - service: fan.set_percentage
    metadata: {}
    data:
      percentage: 100
    target:
      device_id: bd6180dda576fa063bf35daa23f06742
  - delay:
      hours: 0
      minutes: 0
      seconds: 5
      milliseconds: 0
  - service: fan.set_percentage
    metadata: {}
    data:
      percentage: "{{ fanspeed }}"
    target:
      device_id: bd6180dda576fa063bf35daa23f06742

fields:
  fanspeed:
    selector:
      number:
        min: 1
        max: 100
        step: 1
    name: fanspeed
    description: fan speed from calling automation
    required: true
    default: 60
mode: queued
max: 7

Did this almost completely in the UI. Had to add the template for the final fan speed in yaml but that’s it.
You would call it with a service call to script.test_fan_speed and the data being the speed you want to set sent as fanspeed.

Service calls - Home Assistant.

*** UPDATE— Had to fix that, not used to the UI and forgot to add the fan speed targets.

I agree with Sir_Goodenough that it’s unlikely this Feature Request will be fulfilled for the reasons mentioned.

You may wish to consider exploring the possibility of using a Template Fan as a proxy for your MQTT Fan. A Template Fan supports scripting so you can configure it to control your existing MQTT Fan and behave in whatever manner you require.

1 Like

Every fan that I know about either goes to high first, or in the case of controllers for ceiling fans hits high first then the speed you select. Because the majority of fans do this by design, that’s another reason the fan code is unlikely to change for this function.