For people who have smart switches + smart bulbs, it’s currently a nightmare to get them working in sync.
For example, if I want to control the on/off state of my bedroom light through Google Assistant, I need to have both the switch and it’s bulb available to Google… And then it’s a mess: “turn on bedroom light”, “set bedroom light dummy brightness to X”. It’s just really clunky.
I believe it would be possible to update the Light Switch platform to include brightness, colour, temperature and so on of a target light\light group. That way it would be a lot smoother since a single entity would be basically a bulb with it’s on\off controlled by a switch.
I’m confused by what you mean. If you’re talking about a wired smart switch, then when it’s off, the smart bulb is disconnected from power and the network, and will take some time to reconnect when the switch provides power. This would make it difficult for HA to control it.
If you’re talking about an unwired smart switch (eg. flic or Hue dimmer), then do you need to care about the state of the switch? I have a combo of flic and Hue with smart bulbs, and I’ve never needed to worry about the state of the switch. In the case of flic, the switch always fires a toggle. In the case of the Hue, there are separate on/off buttons on v1, so on turns the light on even if it is on. I use this to distringuish between on for a period of time due to motion vs on forever because I pressed the Hue button.
For Google, I generally have another “virtual” light (in my case using the MQTT platform). If I ask Google to turn that light on or set the brightness, I have automation (in Node Red) to do whatever is required. In your case if you have a wired smart switch, this could turn the switch on, wait for the bulb to come online, and then set the brightness.
I think you need to explain your situation better. At first read it sounds like you are powering a smart bulb from a smart switch, which is absolutely crazy.
Do you in fact mean that you have a group of lights, some smart bulbs and some switches (which use the light switch integration)? If that’s the case then you are still going to have issues since a dumb bulb powered by a smart switch has no way of changing brightness / colour etc.
No, I am powering smart bulbs from a smart switch.
I rather have it that way since we’re a bunch people at home and someone would eventually switch off the standard wall switch, thus rendering the bulb inactive.
That’s not a recommended arrangement so a Feature Request to accomodate it is unlikely to be fulfilled.
In Home Assistant, a switch platform doesn’t have those properties (a light does). Asking to make one platform like another platform (when they are different by design) is yet another reason this FR’s implementation is unlikely.
I’m not saying you shouldn’t post Feature Requests for things you want but thought you should know why this one isn’t likely to be fulfilled.
I understand that it’s not recommended but else it’s unpratical for me, hence why I implemented it like that.
I wouldn’t come here and suggest something outlandish that only applies to my specific case; the thing is that the switch to light feature already exists. It should be a somewhat simple thing to include something along “brightness, colour and temperature target X entity”.
The purpose of the Light Switch integration is to make an existing switch entity appear to be a light entity. The main purpose is to permit the switch, now represented as a light, to be included in a Light Group. From the documentation:
This platform allows you to expose this switch as a light source, allowing you to add, e.g., the wall plug controlling your Christmas Tree, to be part of a light group.
The only characteristics switch and light have in common is the ability to be turned on/off so that’s all that the Light Switch integration supports. A switch doesn’t support other light properties, like brightness and rgb_color, so that’s why the Light Switch integration doesn’t include them.