I’ve searched the web and the forum but not found a solution for my problem which is the following:
I have zigbee lamps connected to Hass via zigbee2mqtt and this is working.
By night a sensor is controlling a lamp by setting it to 10% and a specific color
2 In the morning, when I push a switch on hass dashboard, I want the lamp on the 100% and white color.
This must be done by sending a mqtt msg with state on, color xxx but I cannot find how to send this mqtt msg from a button on the dashboard.
Do I need a script, or something in conf file of z2m or something else.
Please can I have a hint to put me in the right direction.
Thanks in advance.
This would be done with a service call service: light.turn_on
You can add a button in the UI and at tap action select call service and type in light.turn_on From there you can select the device and set all kind of stuff like brightness and color/ ect
Any reason this has to be done via a MQTT message? If you have Zigbee2mqtt then the lamp should be a device in HA
I tryed this solution but something is wrong in the payload. The mqtt client returns:
*** PAYLOAD IS NOT VALID JSON DATA ***
Unexpected character (‘p’ (code 112)): expected a valid value (number, String, array, object, ‘true’, ‘false’ or ‘null’)
at [Source: java.io.StringReader@30a77324; line: 1, column: 4]