How to integrate smart lights and smart wall switches

Hi all,

I have a pretty specific home automation setup and would need some help on how to approach the addition of smart lights like yeelights or the tradfri ikea stuff.

The house is controlled using a PLC, every pushbutton push triggers a signal in the PLC and that then turn on a light point somewhere. Main reason for using a wired PLC approach is reliability ofcourse.

Now I want to add smart light bulbs (like yeelights or tradfri) but I don’t want to have them powered on all the time. They burn energy (yes I care even if it isn’t much) and by powering them on and off by using the wall pushbutton I’m hoping to get some more lifespan out of them as the electronics aren’t powered all the time.

I did some reading up on yeelight and apparently they turn on with their last light state if they have been powered off, which is good.

Now, i’m my current setup I’m able to turn on any output from my PLC (so also lightpoints) by publishing a mqtt message:

an example off my lightpoint config:

- platform: MQTT
  name: "Living room light"
  state_topic: "WAGO-PFC200/Out/DigitalOutputs/FB_DO_SW_001"
  command_topic: "WAGO-PFC200/In/DigitalOutputs/FB_DO_SW_001"
  payload_on: "TRUE"
  payload_off: "FALSE"
  qos: 2
  optimistic: false
  availability_topic: "Devices/WAGO-PFC200/availability"
  payload_available: "online"
  payload_not_available: "offline"

my question would be on how to expand this existing mqtt light entity so it has the RGB and light intensity stuff as well? I was thinking on creating two items: the existing one you see above and the Yeelight and use the mqtt topics for brightness on the existing one in Node-Red to control the brightness/rgb settings on the yeelight item? So basically using Node-Red to send any commands comming from the mqtt item to the Yeelight item and using Node-Red to send any data comming from the Yeelight to the mqtt item its mqtt state topics.

I’m not sure what the best way would be to approach this, some input would be nice :slight_smile:

let me know if anything is unclear.