Newbie question about templates

Hello!

My first ever post here..
How do I get the great windrose widget to respond as in this topic:

I only see 0 Directon and 0 Speed?

My Flow :

Inject Node (timestamp) -> Function Node (Randomizer) -> Template Node (Windrose)

The random number generator sends this to the windrose template:

var msg = {
    "payload": {
        "direction": Math.round(Math.random() * 360),
        "speed": Math.round(Math.random() * 25)
    }
}
return msg;

More info about the setup: Images

BR Matte Nilsson

From a quick glance, the template seems to expect a message either like this

{
   "topic": "speed",
   "payload": 29
}

or else like this

{
   "topic": "direction",
   "payload": 247
}

Thanks alot for the answer!
Back to the drawing board.

/Matte

You got me on the right track!
Now it works! Many thanks!

/Matte