Fan Control Setup with Custom UI - A Step-by-Step Guide

Hey everyone, I’ve recently set up a custom fan control system using the Custom UI in Home Assistant, and I wanted to share my experience and the steps I took in case anyone else is looking to do something similar. This was a bit of a learning curve for me, but it ended up being a really satisfying project!

First off, I had a fan in my patio area that I wanted to control more effectively. The default controls were a bit limited, so I decided to create a custom fan speed control card. I stumbled upon the Custom UI repository on GitHub, and it looked like the perfect solution. If you haven’t checked it out yet, I highly recommend it!

Here’s what I did:

  1. Installed Custom UI: I followed the instructions in the GitHub repository to install the Custom UI integration. It was pretty straightforward, and I just added the necessary lines to my configuration.yaml file.

  2. Created the Fan Speed Card: I used the provided code to create a custom fan speed control card. This involved adding a new HTML file to my www/custom_ui directory and modifying my frontend configuration. The code included buttons for Off, Low, Medium, and High speeds, each with different colors to make it visually intuitive.

  3. Configured the Fan Entity: I made sure my fan entity was properly configured in Home Assistant. This involved setting the correct speed attributes and ensuring that the entity was recognized by the custom card.

  4. Testing and Fine-Tuning: After restarting Home Assistant, I tested the new control card by manually changing the fan speed and observing the results. It worked perfectly! I even did a full browser refresh (Shift + F5) to ensure everything loaded correctly.

One thing I found a bit tricky was making sure the fan speeds were correctly mapped to the buttons. I had to double-check the entity attributes to ensure that the speeds were being set correctly. But once that was sorted out, it all worked like a charm!

I’m really happy with how this turned out. It’s a small but meaningful improvement to my smart home setup, and it gives me more control over my environment. Plus, it was a great way to get more familiar with Home Assistant’s customization options.

If anyone else has tried something similar or has tips for improving this setup, I’d love to hear about it! Happy tinkering everyone! :rocket: