Open p4r4d0xs opened 1 year ago
Hey folks,
i wanted to add a Picture for my button with mqtt.publish. so i install your custom cards button addon in HACS.
But when i copy the working mqtt.publish from the standard type: Button to your type: custom:button-card it dosent work anymore.
here is my working button card:
show_name: true show_icon: true type: button tap_action: action: call-service service: mqtt.publish data: topic: zigbee2mqtt/Weihnachtsbaum /set payload: >- { "effect": { "effect": "snow", "speed": 30, "colors": [ { "r": 255, "g": 255, "b": 255 } ] } } target: {} icon: hacs:hacs name: Schneeeffekt
now i add the custom button card
show_name: true show_icon: true type: custom:button-card tap_action: action: call-service service: mqtt.publish data: topic: zigbee2mqtt/Weihnachtsbaum /set payload: >- { "effect": { "effect": "snow", "speed": 30, "colors": [ { "r": 255, "g": 255, "b": 255 } ] } } target: {} icon: hacs:hacs name: Schneeeffekt
and now i get this error message: Fehler beim Aufrufen des Diensts matt/publish. must contain at least one of topic, topic_template.
not working working
The format is different in button card, you should be using service_data instead of data and not target also. Check the documentation for examples
service_data
data
Hey folks,
i wanted to add a Picture for my button with mqtt.publish. so i install your custom cards button addon in HACS.
But when i copy the working mqtt.publish from the standard type: Button to your type: custom:button-card it dosent work anymore.
here is my working button card:
show_name: true show_icon: true type: button tap_action: action: call-service service: mqtt.publish data: topic: zigbee2mqtt/Weihnachtsbaum /set payload: >- { "effect": { "effect": "snow", "speed": 30, "colors": [ { "r": 255, "g": 255, "b": 255 } ] } } target: {} icon: hacs:hacs name: Schneeeffekt
now i add the custom button card
show_name: true show_icon: true type: custom:button-card tap_action: action: call-service service: mqtt.publish data: topic: zigbee2mqtt/Weihnachtsbaum /set payload: >- { "effect": { "effect": "snow", "speed": 30, "colors": [ { "r": 255, "g": 255, "b": 255 } ] } } target: {} icon: hacs:hacs name: Schneeeffekt
and now i get this error message: Fehler beim Aufrufen des Diensts matt/publish. must contain at least one of topic, topic_template.
not working working