What I believe the ‘correct’ way is to ONLY tag the dimmer channel (or color if it is a colored light) with “Lighting” and to call it the name of the light like “Family Room”. Do not tag the switch as the dimmer should handle both.
I have written bindings for lights from scratch and if it does not work then it is IMHO the fault of the binding not correctly handling ON OFF and PERCENT commands on the channel.
Alexa/google home should only see a single light called “Family Room” and you should be able to say:
Turn “Family Room” On
Change “Family Room” to 50% brightness
If that does not work then it should be raised as an issue as Jason posted about above. I don’t use the bindings mentioned to know if this is an issue still or not (old thread), but don’t accept it if it is, create an issue on GitHub.
Any other “solution” is a work around hack and not the correct way to move Openhab forward. The standard is that a channel should handle both and if the code is missing to handle both then it needs to be added. As mentioned I have no idea if this is even an issue still as I don’t use the binding. Often old posts like this are no longer relevant.
Thanks for posting a band aid solution if there is an issue, it is great to know how to work around it, but please create a issue on GitHub (if there is an issue) so it does not drag on and not get fixed.