#Shelly 1 gen 4

1 messages Β· Page 1 of 1 (latest)

worn heart
#

Hello, so i bought a shelly 1 gen 4 relay, it's connected to a non smart physical switch, which is connected to smart bulb connected through wifi in home assistant. Now i've added the switch in home assistant through zha, but now the problem is that if i use the switch button in home assistant, i have to press the physical button twice to change the state... how can i avoid this?

#

or do i need to switch from zha to mqtt to be able to do this?

#

or wifi mode? (that's what chatgpt says lol)

flint cliff
worn heart
#

oh ok

#

well i'll try in wifi mode then i guess!

flint cliff
#

This is a different model but the principle remains the same.
I then use the switch state changing to trigger a toggle of the light entity from the bulb in HA.

worn heart
#

alright thanks!

flint cliff
# worn heart alright thanks!

No worries, It looks like not everything is supported in zigbee mode, however more functionality is expected in future firmware versions.

worn heart
#

ok i see

flint cliff
worn heart
#

had to put it like this

flint cliff
# worn heart

That works well for a dumb bulb but if you have a smart bulb that you want to remain powered even when the light is "off" then detached would be the way to go.

worn heart
#

oh ok

#

let me see what i'm doing wrong with the automation then

flint cliff
#

you may have to enable it

#

you can see "input 0" here:

worn heart
#

but if i press the physical switch in detached mode nothing happens

flint cliff
#

but the switch control doesn't do anything because its detached.

#

you want the switch control to ALWAYS be on.
then you use the sensor changing state to trigger controlling the smart bulb.

worn heart
#

ooooh ok i see

flint cliff
#

the control is for the relay, the sensor is detecting the switch.

flint cliff
#

I suggest have 2 triggers on your automation
sensor going from on->off and off->on
as this will filter out any random state changes going to unavailable and stuff if network drops for a moment or something.

#

so something like:
trigger: input 0 off->on
trigger: input 0 on->off
action: light toggle smartbulb

worn heart
#

lol wait cuz now becuase of me doing shit my bulb is not connected anymore haha

flint cliff
worn heart
#

yeah

#

πŸ˜„

#

i'm using yeelight bulbs

#

and now it can't fucking find the bulb anymore

flint cliff
worn heart
#

ofcourse πŸ˜„

#

alright

#

it's working!!!!!

#

awesome! thanks πŸ™‚

#

now i need to buy more of these relays for other switches πŸ™‚

flint cliff
worn heart
#

ooh ok i'll be looking out on that then

#

oh god

#

i can't fit it in the wall hole hahaha

#

i think i'll have to buy a mini version of it

flint cliff
worn heart
#

the relay fits, but with the wall switch and the wago's it doesnt πŸ™‚

#

ok, all i really need to do is this anyways

flint cliff
worn heart
#

no i don't

flint cliff
#

You get get (or print) spacers.

#

Even with minis sometimes I have a slightly issue fitting stuff in so have spacers to give a little bit more room.

#

They are cheap enough, It is just if you had a 3d printer you could solve the issue without ordering something. πŸ˜›

worn heart
#

sorry i don't see what youy mean, can you send a picture

flint cliff
#

moment

flint cliff
#

UK switch, so might be different for you but the concept remains.

worn heart
#

oooh yeah ok so that the wall switch is aactually a little further ok

flint cliff
#

this fused spur needed 2

#

I keep meaning to replace it with 1 bigger one but I havent gotten around to it.

worn heart
#

πŸ˜„