Speed Fan - Only Want High/Low Speed

Hi All -

I’m looking at replacing my hot tub pack with ESPHome and some relays and I have a two speed water pump but had a couple questions… I’m using one relay for power on/off and another relay to change between high and low speeds (COM - POWER, NO - LOW, NC - HIGH). Here is my setup -

State		GPIO1	GPIO2
Pump OFF	LOW		LOW
Low Speed	HIGH	LOW
High Speed	HIGH	HIGH

I’ve set up a custom output for the two relays for high and low speed using a custom float output and am going to expose to HA as a speed fan. However, it appears that speed fan defaults to low/medium/high and I only really need low/high. Is there any way to make speed_fan just show low and high? When I set the float values for high and low in my yaml, it just adds the medium back in by default.

Also, using ESP32, do I explicitly need to define the off state for speed fan, or will the GPIOS just go low when speed fan is turned off?

Thanks!

PS - I’m loving ESPHome now that I’m working on this project and have already written the config to replace my garage door controller (tasmota), irrigation system (tasmota), security system (konnected) and various other tasmota ESPs I have around the house. The integrated API is awesome and how it’s set up in integrations menu is awesome!

I had a similar problem and didn‘t find a way around yet, I just set low and mid to the same float values (0.5 in my case), this works but a solution with just low and high would be great…

Thanks for the reply. Perhaps I’ll put a feature request for supporting different/fewer/additional speeds. Seeing that you need to use a custom float to begin, there isn’t any real reason that I can think of to not support more than three floats…

Have you try editing the speeds available in Customize? Just remove the speeds you don’t want. I think that should do what you’re looking for.

Hmmm yeah I could do that but my problem is not the representation in HA, I don’t care about that, I control the fans a different way and just show the status.
I would like to have the speeds not fixed but a flexible dictionary.
I had a look into the speedfan but the structure and the inheritance from the fan component is a bit much for me atm…

Thanks @jazzyisj for the idea. Might work for my use - I’ll give this a try. Now just for the rest of my parts to arrive :smiley:
This pump will be my first “fan” in HA, so I didn’t realize that part of the entity was customizable.

Also, anyone know about needing to set an off state to bring the GPIOS back low?