Shelly Switch Input automation with smart light

I have installed several Shelly devices last week, and the ones with old - dumb - lights work flawless. The tricky part however is the ones with smart bulbs.

I’ve configarted the Shelly as detached switch and always on. Also activated the input entity in Home Assistant. So far, so good.

When I toggle the switch on the wall, nothing happens. Exactly how it’s supposed to in my opinion. And I’m able to control the smart light bulb via Home Assistant

The problem seems that the state of the shelly, doesn’t change. So it stays on or off. So this situations can occur

  • The smart bulb is on, but the shelly input is off
  • The smart bulb is off, but the shelly input is on
  • The smart bulb is on and the shelly input is on
  • The smart bulb is off and the shellu input is off

So in two conditions, the state is equal, in two situations, it’s different. I do however want to be able to control the smart bulb, also via the switch (for if someone accidentally flips the switch). Is there an easy way to do this? Or do I have to build a couple of automations with if/else statements?

  • if the switch is off and the light is on and switch goes to on switch the light off ← something like that?

Hope someone here has some easy trick for this =)

Thanks!

I have 2 circuits build similar to what you want to achieve:

  1. Kitchen: here I have Shelly 1L configured with buttons as toggle and I also have motion sensor. Automations is configured in the way that if switch is off motion sensor controlls the light. If the switch is on, the light goes on untill switched off manually and motion sensor is ignored.
  2. Hall: here I have Shelly 1L configured with detatched buttons and motion sensor. Automation is configured so that it there was no toggle event from button, motion sensor is controlling the light. If light was manually switched on I start the timer that switches the light off after 10 minutes. During this period motions sensor resets the time every time motion is detected. This way I can controll the light on/off with switch every time it is toggled and if nothing happens then the light is turned off after etended period of time.

In both cases it is possible to control the light from HA UI or some other automations (like presence simulation). But I do not think it is achievable only by proper configuration of Shelly itself.