Help to combine a Colour Light and a Switch into a Single Coloured Light Entity

I’d like to combine a coloured light bulb with a wall switch into a single entity so that when I issue a voice command to Google Assistant, both items are treated as a single device.

My Devices:

  • LIFX Coloured Light Bulb - seen by HA as a coloured light
  • Sonoff Mini Switch using Tasmota - seen by HA as a switch
  • HA is integrated to Google assistant and can see the HA entities

Why do I want to combine the entitites, well because i’d like to achieve this scenario in a single command within the HA UI or via Google Assistant. Most complex scenario I’d like to achieve

  1. Wall switch is off and there is no power going to the coloured bulb
  2. I issue a command to HA or Google Assistant to “set the colour to red”
  3. HA recognises the switch is off then turns the switch on
  4. Upon receiving power the LIFX light bulb turns on with the last used colour it has and connects to WIFI after a few seconds
  5. HA sees that the bulb is now connected and is in the wrong colour and corrects it to be red per the instruction given.

There is this thread, however it seems to have stalled in any further development https://community.home-assistant.io/t/color-support-for-light-template/46651

Does anyone know how to do this using MQTT or otherwise?

2 Likes