I’ve got a few remote-controlled ceiling fans (Lucci Air) in our house and I find them a complete pain to operate as you need to remember to turn the switch on and then use the remote to control the light and fan speed. And they are also not integrated with HA, so I can’t control them as part of the house climate control.
If you add something like i.e. a ZigBee Switch Electricity Energy Monitor KWh (I use these) you can even “sense” the current status of those fans by their power usage (speed, fan on/off state, light state) no matter whether they are switched through the wall switch or through HA. I am using this for ACs (controlled by Broadlink IR blasters) and it works very reliable.
fan:
- platform: template
fans:
template_family_room_fan:
friendly_name: "Family Room Fan"
# Measures the power use from a Shelly1 PM and if over 3W, marks the fan as on
value_template: "{% if states('sensor.family_room_fan_power') | float (0) > 3 %}on{% else %}off{% endif %}"
# Uses the Shelly1 PM sensor value to determine what speed the fan is going at. Only set to measure 33, 66, 100
percentage_template: "{{ states('sensor.template_fan_percentage_family_room') }}"
@slace Hey Aaron. Is your full code on Github somewhere? I couldn’t find any of your repos written in YAML. I’d like to try and merge your code with mine but I’m unsure what name you used for your speed commands and as a hardware guy, deciphering many lines of complex template code is not my forte.
I don’t have my YAML files on GitHub, one day I’ll get around to that
For the RF commands recorded per-fan I have then named fan_speed_<number> so fan_speed_1 is the first speed, etc. I don’t track fan_speed_0 though as that is when it’s turned off, so I just call the off command.
Since the commands are scoped to the fan by Home Assistant, I don’t put the name in the command storage.
This is how I use it in a script (fan_speed_set from the blog post):
Thanks Aaron. I’ll have a go at using your code and then modifying the percentage_template to use my power consumption sensor and see how that looks. I’ll report back.
A slightly unrelated question, but I have not seen a lot of threads about ceiling fans (for some reason it is only popular in the US as far as I could tell):
how do you find the setup itself? How does a ceiling fan compare to - let’s say - a tower fan? Is it more for mixing the air for the given room in the house, or can you actually feel some form of cooling effect?
regarding the Broadlink, where did you place the unit itself? Would it be feasible to place it in the living room and expecting it to be able to control the fan in the kitchen for example? Can it control fans/devices on a different floor?
I am considering the same setup with ceiling fans albeit I am bit hesitant to but them as I am not sure if they would have the desired effect (on-demand cooling of a given area)
We built a new house and the fans were installed as part of that so I can’t comment on whether a tower fan would be better.
For placement, I have the broadlink in around about the middle of the house (sitting on a TV unit as it also controls the TV) and it’s able to reach everywhere just fine.
Hi Aaron
first, thank you for the scripts and great explanation.
I used it to install my 3 speed ceiling fan today and it took me a while to figure out why it would only set speed to 1 and 3, not 2.
same shitty Lucci air fans, wife bought them without my approval and now trying to get them to work with rm4 pro however there seems to be a home assistant bug where it cannot learn rf commands anymore