Update Sensor Attributes from Node Red?

Is there a way to set attributes for a sensor from node red? I want to use the custom list card to display a list of things that I create in node red. The custom list card requires the list be in the form of objects in the attributes.

I’ve tried to use mqtt but it changes the format of the attributes I send and doesn’t work quite right. Is there a way to directly change the attributes?

This is able to be done using the API node. Using something similar to the below: Works good!

image
image