MQTT Toggle Switch Setup Assistance

Greetings all, I’m currently working on integrating a toggle switch into my smart home setup using MQTT. The goal is to have a single button that toggles between on and off states, publishing ‘1’ and ‘0’ respectively to my MQTT topic. I’ve managed to get individual buttons working with the standard button cards, but consolidating them into a single toggle button has proven a bit challenging.

I came across the MQTT Switch integration in Home Assistant, which seemed promising. I followed the setup guide and configured my configuration.yaml accordingly. However, after adding the switch entity to my dashboard, it appears greyed out and unresponsive. I’m wondering if there’s something I’m missing in the configuration or if there’s a more straightforward method to achieve this without resorting to custom cards or complex scripts.

I tried modifying the Lovelace custom button cards, but it felt overly complicated for such a basic function. Perhaps there’s a simpler approach or a different configuration that I haven’t explored yet. Any insights or suggestions would be greatly appreciated! I’m eager to get this working and would be happy to share my final setup once it’s up and running smoothly.