But if I have to make a configuration such that, I can start two light switches at the same time as well as one at a time. I will have to deal with command topic for that but not getting any information to get a common light switch on screen to switch both of the lights at the same time.
Hm, don’t understand exactly what you want, but switching 2 lights with 1 button could be easily achieved with an automation. For example, button press turns on both lights. Button press again turns them off. However this will not make it possible to switch both lights separately (or you would have to add conditions to it).
Thanks @jimz011 for replying, as you described that I can have a single button for both the lights what would be my configuration in configuration.yaml file?
Also my plan is to switch then on and off simultaneously but also I can switch then on and off separately one at a time, is it possible?
Most proper way to do this is probably setting up a group. But someone reacted before I had the chance
I will post an automation based on this when I get home. Doing this on a phone is horrible haha. But what it comes down to is that your trigger would be the button and the action will be toggling the group you’ve set up.
I will add the code later on (within 2 hours or so) when I have a proper computer available. Though the other answer with the single/double/triple click is something you might consider as well if you are looking for something more flexible.
Edit: just checked his github page and it uses an Aqara button for this (made by xiaomi). This single/double/triple click might only work with those buttons. I don’t know what kind of button you use. But by the looks of it it is probably something like a Sonoff (or other mqtt button). I doubt the automation will work for your case. But if you do have an Aqara button than you could just use his automation as it is perfect for those button.