Save value into a temporary variable

I do some calculation on node-red and send thsi over via mqtt to ha. Is there any possibility to store that value into a variable entility who is not saved into a database and only show as long HA not reboot or there is not such solution?
By the way I want display this value inside lovelace.

The only “variables” that exist in home assistant that have scope outside of automations/scripts/templates are entities themselves. You can of course create an entity that is not included in the recorder database or you can use a single entity that holds a bunch of variables for different purposes. But at the end of the day, you need to use an entity.

1 Like

I have one question about that Git Variable pack. I am newbie in that topic. As I see this example variable.update_sensor will update a real sensor or i could store my vlaue inside variable.update_sensor ?
And this will not save inside that database and only hold on ram?

variable.update_sensor is an action that is used to change the value of one of the sensor entities that you need to create either through the UI or in YAML.

When I said you have to store the value in an entity, I really meant it. There are probably hundreds of ways to do that (both natively and with custom integrations), but they will all end up with a value stored in an entity.

You can exclude an entity from your recorder database with these settings.

Probably the most flexible way to store variables natively is with the trigger-based template sensor described in this post:

1 Like

Here’s one way to do it (there are several other ways):

  1. Create an Input Text helper.
  2. Exclude it from the Recorder integration.
  3. In your Node-Red flow, write your value to the Input Text.