bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
93 stars 27 forks source link

no update/modification of "rotate: dur #71

Closed judie07 closed 3 years ago

judie07 commented 3 years ago

hello, i can't control the following attribute via "Control via messages"!

"payload": { "command": "set_attribute", "selector": "#Solarpumpe", "attributeName": "dur", "attributeValue": "1s" }, { "command": "update_attribute", "selector": "#Solarpumpe", "attributeName": "fill", "attributeValue": "green" } The change of the color works, the change of the speed does not!

Is there another way to ask questions? Thanks

bartbutenaers commented 3 years ago

Hi Judi, Could it be that you have forgotten to pass an array, instead of two separate objects? I think you should pass it like this:

"payload": [ {
"command": "set_attribute",
"selector": "#Solarpumpe",
"attributeName": "dur",
"attributeValue": "1s"
},
{
"command": "update_attribute",
"selector": "#Solarpumpe",
"attributeName": "fill",
"attributeValue": "green"
}
]

But I cannot test it, because I haven't got your flow (incl. svg node)...

BTW the normal way to ask questions is via the Node-RED forum.

Bart