Help with Shelly 1 management

Hello there!

I have a Shelly 1 installed behind a switch that controls a bathroom fan. Right now I have it configured as a toggle switch with the cable form the physical switch connected to the SW screw.

My problem right now is that the physical switch overrides my automation. If the fan is set to run from HA and someone flips the switch to on and then to off, the fan will stop.

What I would like to have is a way to keep HA as the main actor: as long as HA keeps the fan on, it should stay on indifferent of the physical switch position. Or… the fan should turn on if HA OR the switch is on. the fan should turn off only if HA AND the switch is off.

Any ideas?

Since the fan has a delay at turning off, I was thinking of an automation that would check the humidity every time Shelly is set to off (indifferent of the source) and switch it back on if the humidity is above the threshold. The only problem with this is that the relay will be triggered quite a lot more often, which is not ideal from a longevity point of view.

Thanks!

Hello @daniel_d!
You could configure your Shelly as detached switch, which will make the physical switch not act on the output.

Then, you can use Shelly events to catch the triggers from the switch, and act on the automation.

Are you using Shelly local, not cloud, correct?

Best regards

Thanks for your answer. Yes, it is local.

So set the Shelly as detached switch from its web interface (without actually disconnecting the wire from the switch). Then have an automation monitor the input of the Shelly (I guess this can be visible in HA) and trigger Shelly based on this and other conditions. Right?