Here is my nodered flow - the “external wind direction” is updated every second - if i take this sensor and add it to lovelace, the value changes from 0-359 every second, pending where the wind is.
[{"id":"6bff04c3.1d096c","type":"csv","z":"720ab126.608a6","name":"","sep":",","hdrin":false,"hdrout":"none","multi":"one","ret":"\\n","temp":"DIR,SPEED,PRESS,TEMP,RH,DEWPOINT,VOLT","skip":"0","strings":false,"include_empty_strings":false,"include_null_values":false,"x":210,"y":300,"wires":[["68100633.dfa9c8"]]},{"id":"68100633.dfa9c8","type":"split","z":"720ab126.608a6","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":340,"y":300,"wires":[["d9c14757.617bd8"]]},{"id":"d9c14757.617bd8","type":"switch","z":"720ab126.608a6","name":"","property":"parts.key","propertyType":"msg","rules":[{"t":"eq","v":"DIR","vt":"str"},{"t":"eq","v":"SPEED","vt":"str"},{"t":"eq","v":"PRESS","vt":"str"},{"t":"eq","v":"TEMP","vt":"str"},{"t":"eq","v":"RH","vt":"str"},{"t":"eq","v":"DEWPOINT","vt":"str"},{"t":"eq","v":"VOLT","vt":"str"}],"checkall":"true","repair":false,"outputs":7,"x":490,"y":300,"wires":[["18ef2748.baef39"],["27d9d361.a0263c"],["51b22e6d.0ae55"],["7b7526c1.4a9d68"],["5364900b.3b29e"],["25b0ae57.beb3d2"],["68bf2d8c.1ea8d4"]]},{"id":"4c2d8b30.068334","type":"udp in","z":"720ab126.608a6","name":"","iface":"","port":"2559","ipv":"udp4","multicast":"false","group":"","datatype":"utf8","x":60,"y":300,"wires":[["6bff04c3.1d096c"]]},{"id":"27d9d361.a0263c","type":"ha-entity","z":"720ab126.608a6","name":"External Wind Speed","server":"eabe397b.2e7ab8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"external wind speed"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"Mph"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":740,"y":240,"wires":[[]]},{"id":"51b22e6d.0ae55","type":"ha-entity","z":"720ab126.608a6","name":"External Air Pressure","server":"eabe397b.2e7ab8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"external air pressure"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"mbar"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":740,"y":280,"wires":[[]]},{"id":"7b7526c1.4a9d68","type":"ha-entity","z":"720ab126.608a6","name":"External Temperature","server":"eabe397b.2e7ab8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"external temperature"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":740,"y":320,"wires":[[]]},{"id":"5364900b.3b29e","type":"ha-entity","z":"720ab126.608a6","name":"External Humidity","server":"eabe397b.2e7ab8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"external humidity"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"%"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":730,"y":360,"wires":[[]]},{"id":"25b0ae57.beb3d2","type":"ha-entity","z":"720ab126.608a6","name":"External Dew Point","server":"eabe397b.2e7ab8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"external dew point"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"°C"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":730,"y":400,"wires":[[]]},{"id":"68bf2d8c.1ea8d4","type":"ha-entity","z":"720ab126.608a6","name":"External Station Voltage","server":"eabe397b.2e7ab8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"external station voltage"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"Vdc"}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":750,"y":440,"wires":[[]]},{"id":"18ef2748.baef39","type":"ha-entity","z":"720ab126.608a6","name":"External Wind Direction","server":"eabe397b.2e7ab8","version":1,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"external wind direction"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"$entity().state ? \"on\": \"off\"","outputPayloadType":"jsonata","x":750,"y":200,"wires":[[]]},{"id":"eabe397b.2e7ab8","type":"server","name":"Home Assistant","addon":true}]
But as soon as its applied to the template, it doesn’t seem to work