Here is my MQTT Light config for a Shelly Duo bulb - couldn’t find any templates for this one, scraped this together from various other posts. On/off, brightness, color temp and state all working. This is using the native MQTT service on the bulb, with the Shelly cloud function disabled.
I use my Shelly Duo GU10 in various automations, sometimes bulb is dimmed, sometimes set to 100% brightness (through JSON payloads). I use mqtt.publish (action):
topic: shellies/ShellyBulbDuo-<deviceid>/light/0/set
payload: '{ "brightness": value (0-100), "white": value (0-100), "temp": value (2600-6500), "turn": "on" }'
It works well as long as bulb is online.
What I wanted to automate is whenever bulb is turned on physically (via switch) it should start with brightness set to 100%, and with middle range of temp. It should start this way regardless to the last state before the switch was turned off (bulb offline). Further action is switching the brightness to 50% following set delay (ie. 00:00:30), and finally, after another delay (let say another 20 sec), complete turn off.
A user activate the light again with switch (turning it off - bulb goes offline, and on - bulb again online). Automation start over again.
I was not successful, since it seems bulb switches on (online) with last state, and despite the automation payload does not lead to expected result. Do I mess something with retain/qos flags?
Can your mqtt template be used with above mentioned automation? How to set the trigger (mqtt?) and action (mqtt) properly to get the bulb always 100% bright and set to desired temp? Can you advise? Could you test this with your enviroment?
When you physically turn bulb off (bulb is offline), what entity state you can see. If retain is used, then last state is on in my case, which makes difficult to use that state as trigger for the action.
Hi, thank you for your work.
I have a problem, the brightness works good but the on and off don’t work.
I see that under the mqtt topic the json ison value in my duo light can be true or false but also with this change the light don’t power on and off. This is my example:
Hello guys, I have Shelly Duo Bulb and i want to be able to control RGB, on/off, etc. from HA. How to make the setup, should I use MQTT and how? Where to put these configurations which you have posted?