between Dr. Google and chatgpt I've managed to get a thingie cobbled together. The buttons work and change color but I cannot get any message out of the node.
[{"id":"22d3b09c875ea7cd","type":"ui-template","z":"fa9ba6ad9968fdec","group":"6302448d36e7038c","page":"","ui":"","name":"Which day active","order":1,"width":"6","height":"8","head":"","format":"<template>\n <v-container>\n <h3>Select which day</h3>\n\n <v-col style=\"height: 25px; width: 400px; background-color: black\">\n <v-row>\n <v-card class=\"containerTop\">Sunday</v-card>\n <v-card class=\"containerTop\">Monday</v-card>\n <v-card class=\"containerTop\">Tuesday</v-card>\n <v-card class=\"containerTop\">Wednesday</v-card>\n </v-row>\n </v-col>\n\n <!-- Row 1: Sunday to Wednesday -->\n <v-col style=\"height: 80px; width: 400px; background-color: black\">\n <v-row>\n <v-card class=\"container\">\n <v-btn rounded @click=\"toggleDay('sunday')\" :class=\"{ 'active': isActive['sunday'] }\">{{ buttonText['sunday'] }}</v-btn>\n </v-card>\n <v-card class=\"container\">\n <v-btn rounded @click=\"toggleDay('monday')\" :class=\"{ 'active': isActive['monday'] }\">{{ buttonText['monday'] }}</v-btn>\n </v-card>\n <v-card class=\"container\">\n <v-btn rounded @click=\"toggleDay('tuesday')\" :class=\"{ 'active': isActive['tuesday'] }\">{{ buttonText['tuesday'] }}</v-btn>\n </v-card>\n <v-card class=\"container\">\n <v-btn rounded @click=\"toggleDay('wednesday')\" :class=\"{ 'active': isActive['wednesday'] }\">{{ buttonText['wednesday'] }}</v-btn>\n </v-card>\n </v-row>\n </v-col>\n\n <v-col style=\"height: 25px; width: 300px; background-color: black\">\n <v-row>\n <v-card class=\"containerTop\">Thursday</v-card>\n <v-card class=\"containerTop\">Friday</v-card>\n <v-card class=\"containerTop\">Saturday</v-card>\n </v-row>\n </v-col>\n\n <!-- Row 2: Thursday to Saturday -->\n <v-col style=\"height: 80px; width: 300px; background-color: black\">\n <v-row>\n <v-card class=\"container\">\n <v-btn rounded @click=\"toggleDay('thursday')\" :class=\"{ 'active': isActive['thursday'] }\">{{ buttonText['thursday'] }}</v-btn>\n </v-card>\n <v-card class=\"container\">\n <v-btn rounded @click=\"toggleDay('friday')\" :class=\"{ 'active': isActive['friday'] }\">{{ buttonText['friday'] }}</v-btn>\n </v-card>\n <v-card class=\"container\">\n <v-btn rounded @click=\"toggleDay('saturday')\" :class=\"{ 'active': isActive['saturday'] }\">{{ buttonText['saturday'] }}</v-btn>\n </v-card>\n </v-row>\n </v-col>\n\n </v-container>\n</template>\n\n<script>\nexport default {\n data() {\n return {\n isActive: {\n sunday: false,\n monday: false,\n tuesday: false,\n wednesday: false,\n thursday: false,\n friday: false,\n saturday: false\n },\n buttonText: {\n sunday: 'Power On',\n monday: 'Power On',\n tuesday: 'Power On',\n wednesday: 'Power On',\n thursday: 'Power On',\n friday: 'Power On',\n saturday: 'Power On'\n }\n };\n },\n methods: {\n toggleDay(day) {\n this.isActive[day] = !this.isActive[day];\n if (this.isActive[day]) {\n this.buttonText[day] = 'Power On';\n this.send({ topic: 'Yes',payload: true});\n //this.send({ topic: buttonText[day], payload: 'On' });\n } else {\n this.buttonText[day] = 'Power Off';\n //this.send({ topic: day.charAt(0).toUpperCase() + day.slice(1), payload: 'Off' });\n }\n },\n send(message) {\n // Implement your MQTT send logic here\n this.send({ topic: 'day', payload: 'on'});\n }\n }\n};\n</script>\n\n<style scoped>\n\n.containerTop {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100px;\n height: 25px; /* Adjust height as needed */\n background-color: black;\n color: white;\n font-size: 12px;\n text-align: center;\n border-bottom: 2px solid #dd7f00;\n border-top: 3px solid #6689a1;\n border-left: 3px solid #6689a1;\n border-right: 3px solid #6689a1;\n}\n\n.container {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100px;\n height: 80px; /* Adjust height as needed */\n background-color: black;\n border-bottom: 3px solid #6689a1;\n border-left: 3px solid #6689a1;\n border-right: 3px solid #6689a1;\n}\n\n.box {\n width: 25px; /* Adjust box width as needed */\n height: 80px; /* Adjust box height as needed */\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.centered-button {\n padding: 10px 20px;\n color: white;\n font-size: 16px;\n cursor: pointer;\n}\n\n.button {\n display: flex;\n width: 75px;\n padding-top: 2px;\n border-top: 5px;\n background-color: grey; /* Default background color */\n color: white;\n font-size: 12px;\n border: none;\n cursor: pointer;\n}\n\n.active {\n background-color: green; /* Changed background color when active */\n}\n\n.a1 {\n background-color: black;\n justify-content: center;\n text-align: center;\n height: 25px !important;\n width: 140px !important;\n margin-top: 5px;\n margin-bottom: 1px;\n margin-left: 5px;\n margin-right: 5px;\n font-size: 16px;\n color: #6689a1;\n padding-bottom: 4px;\n border-bottom: 2px solid #dd7f00;\n border-top: 2px solid #6689a1;\n border-left: 2px solid #6689a1;\n border-right: 2px solid #6689a1;\n}\n\n.a2 {\n background-color: grey;\n justify-content: center;\n align-items: center;\n text-align: center;\n height: 50px !important;\n width: 100px !important;\n margin-top: 1px;\n margin-bottom: 5px;\n margin-left: 5px;\n margin-right: 5px;\n font-size: 16px;\n color: #6689a1;\n padding-bottom: 2px;\n border-bottom: 2px solid #6689a1;\n border-top: 2px solid #6689a1;\n border-left: 2px solid #6689a1;\n border-right: 2px solid #6689a1;\n}\n\n</style>","storeOutMessages":true,"passthru":false,"resendOnRefresh":true,"templateScope":"local","className":"","x":1030,"y":700,"wires":[["9d0ce6c9ceedc075"]]},{"id":"9d0ce6c9ceedc075","type":"debug","z":"fa9ba6ad9968fdec","name":"debug 1117","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"true","targetType":"full","statusVal":"payload","statusType":"auto","x":1230,"y":700,"wires":[]},{"id":"6302448d36e7038c","type":"ui-group","name":"LED","page":"5bf011da4789737d","width":"6","height":"1","order":6,"showTitle":false,"className":"","visible":"true","disabled":"false"},{"id":"5bf011da4789737d","type":"ui-page","name":"LED","ui":"be93d1640cb1fd4c","path":"/page06","icon":"home","layout":"flex","theme":"b6221fc08b602ea9","order":1,"className":"","visible":"true","disabled":"false"},{"id":"be93d1640cb1fd4c","type":"ui-base","name":"PageOne","path":"/dashboard","includeClientData":true,"acceptsClientConfig":["ui-notification","ui-control"],"showPathInSidebar":false,"navigationStyle":"default","titleBarStyle":"default"},{"id":"b6221fc08b602ea9","type":"ui-theme","name":"Default Theme","colors":{"surface":"#ffffff","primary":"#0094ce","bgPage":"#eeeeee","groupBg":"#ffffff","groupOutline":"#cccccc"},"sizes":{"pagePadding":"12px","groupGap":"12px","groupBorderRadius":"4px","widgetGap":"12px"}}]
any help appreciated
Thanks