Unusable "number" variables

HI, I have some simple calculations involving number variables, but three of my variables have become unusable. I cannot delete them or reconfigure them, as I receive the following message when trying to open the variable:
“TypeError: Cannot read property “toString” of null TRY AGAIN”

Can anyone help please?

Welcome Neil_D!
Could you please show a bit more about what you did before you received the error message?
Sounds as if you have used variables of wrong type or if you try to use a variable that has no value.

Hi Dirk and thank you for the fast reply! I hope it is something straightforward as you suggest…
I am trying to base power decisions around my house (pool pump ON/OFF, pool heater ON/OFF etc) on the net export from my solar panels. Our utility company no longer pays a “good” feed-in tariff for solar exports so I may as well use as much as I can and minimise consumption from the grid. This week I bought an EV (Tesla) and so this has just become a bit more “real”.
Several months ago I created a “Number” variable and called it “Export Power”. I created a simple flow to subtract the “power consumed” from the “power generated” in the Enphase Envoy device (Solar Panels app) and then wrote the result into this variable “Export Power”.
I used this variable to trigger the start and stop of various electrical loads around the house.
After a few months of this working daily, it stopped working, giving this error.
I then created a new number variable called “Power Export” with the same formula and used it instead. It has worked until today, when it has first “frozen” in value and then about an hour later failed with the same error. I have tried a third time with a new variable “Solar Export” and it failed with this error immediately.

I have uploaded a screenshot of the flow, hope it is visible when I post this!
Thanks again for looking at this for me.


Is not equal to this

Can you find the differences?

So why does your flowcard error?
Most flowcards have helpers, and you should just follow the examples


And in advanced flow, just hover the (i)

Thank you Peter,
I have changed the formatting (included multiple curled brackets) and it appears to be working again.
I am still not sure why it worked for a while and then stopped, I don’t recall deleting the formatting!


1 Like

Yeah I was wondering why you used just one bracket. You must have seen an example once.

I use Homey for a few years now, but (parts of) text doesn’t disappear by itself.
Unintentionally deleting parts of text happens to me from time to time…

thanks again, now I just need a sunny day to implement my solar car charging!

1 Like