Custom light switch to combine Sonoff and Wemo commands

Hi
I used to just have Wemo bulbs installed but they were a real pain because when turned off at the wall switch, they go offline and fail to be “smart”. So I wired up Sonoff basics to control the circuits they’re on. Now I have smart lights that thanks to GPIO14 also can be toggled from the wall switch - Great.
But if I want to control the dimming capabilities of the globes I need to access a different entity.
What I would love to do is have a custom light switch where the HA switch is talking to the sonoff. And the sliding dimmer control talks to the Wemo bulb. So from the grab pasted below, one part controls the sonoff and the other part controls the Wemo.

Capture

Is this possible?

Oh, the dimmer would need to just disapear when power to the circuit is off, Don’t want an unavailable message or error appearing in this situation.

If it is possible - could somebody offer some clues please?
Thanks!

Sorry for my dumb question. I am now into the world of Lovelace and custom cards. This link helped me achieve what I wanted…
https://community.home-assistant.io/t/lovelace-light-group-slider/64136/2