Problem with global.get - it keeps returning a null value

I'm at a loss why this is happening.

I have a current global context "totalvalue" per this:
nr1

I'm accessing the context in a function node per the simple example flow shown below :
nr2

However this returns a null value for the global get, as the payload is always zero (per the expression "|| 0"). It never returns 46515.

Must be a rookie mistake but I'm pretty sure it looks correct. Don't know if it's relevant but this is the NR addon in home assistant.

EDIT: It looks like it fails if the context is stored in the filesystem. If it's in memory it works.How do I point the get function to the correct spot?

I'm an idiot. I need to use global.get('totalvalue','file').

Leaving this up in case some one else needs to refer to it :smiley:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.