Detecting fan light on/off for better automation

Hi,

I have a ceiling fan controlled over RF using a Bond in HA. The fan light has a single toggle command, so when it’s turned on or off outside of HA (e.g. using original remote) then the state in HA is incorrect and automations like “turn OFF all the lights” toggle the ceiling fan ON instead of OFF.

I suspect the way to resolve this is having a physical sensor to detect if the light is actually on or off and use that to update the internal state in HA (based on reading other posts where people here have suggested using contact sensors to detect if an aircon is on, for example).

Has anyone done something like this before?

I’m guessing mounting an ESP32 above the fan with two light sensors - one to measure ambient light and the other to measure the brightness closer to the light.
But I’m stuck with 1. How to get the second light sensor close to the light when there are fan blades in the way 2. How exactly to build this/if there’s a similar project out there I can adapt (I’m a software guy but I’ve hacked together an Arduino project a decade ago)

Any help would be hugely appreciated!

light → esphome solution but I would no do that , too difficult I would say.
wind / motion → mmwave sensor ( like a DFrobot SEN0395) could help here easily with good orientation of the sensor and some fine tuning to check specific area (via esphome)
A power meter (clamp or something else like smart plug)

Also possible via a ultrasonic radar to check when a propeler is passing , distance will change ? :slight_smile:

You can’t create a receiver and listen for the signals from the remote?
Remote Receiver — ESPHome

Thanks, that’s a great idea! I have multiple fans so this way I only need to build one receiver and use it for all (assuming the range is similar to the Bond device).

I’ll need to investigate to find a good guide on how to actually build this and then get the right equipment. I’ll share my progress here when I get to it.

Do you have a wall switch tied to this fan and its light in the room? if so you can swap out to a smart wall switch or a relay that supports fan speeds and go from there to get more consistent automation’s.

That said there is a setting to inverse the input of an action via a helper:

image

Not sure if its available without