#trying to do something really stupid but
1 messages · Page 1 of 1 (latest)
it's a flow to work how much money is being made by my solar system and also how much money is being saved by not having to draw power from the grid
to get around it losing the data on a restart or redeploy I was using the persist nodes to feed the last value back into the sum node on restart
what sensor are working as expected and which aren't
soalr total gained and monthly gained both work fine
cost test and cost test monthly are the ones that lose their place
and now don't work at all
it's possible the other 2 are also broken but it won't tell me that until data is fed to them once the sun comes up
you still don't have those two checked to resend on connect
oh yeah I unchecked them because it didn't do anything
it will fix your issue
it didn't seem to in testing
once they send a value it will resend the last sent value on a reconnect
yeah but then because the sum node starts again it just overwrites it with the lower value
I've just added that from a forum post I found you in as a way to trigger the persistent node to feed the last value back into the sum node
but adding that has seemed to have broken everything
you can also check the "show debug information" in the sensor entity config node to see everytime it updates HA
might help track down when the bad value is sent
that's what the 2 cost test nodes spit out, but how would adding that event node have broken the entire thing?
it can't be updated anymore, the integration keeps complaining about both missing credentials and the fact it isn't loaded
ever since I imported that event example
``Version: 0.65.0
Home Assistant instances: 3
Server: 23bc7ade.f3e506
Home Assistant version: 2024.6.4
Companion version: 4.0.0
Server: 1e5734de.b5addb
Home Assistant version: 2024.6.4
Companion version: 4.0.0
Server: 2e31528c.f3973e
Home Assistant version: 2024.6.4
Companion version: 4.0.0
Node-RED version: 4.0.0
Docker: yes
Add-on: no
Node.js version: v18.20.3 x64 linux
OS: Linux 6.6.33-haos x64
``
what's the difference between "cost test" and "cost test monthly"? one get reset montly?
yeah
that's why the reset trigger is hooked into the monthly generation figure
if that turns to 0 it triggers a reset
what are the entity ids for the two sensors
de422d9810618e60
in HA it's sensor.de422d9810618e60?
the entity_id not the friendly name
in ha they show as this
tbh I don't know why there's 3 of the same thing
but cost test daily is the de422 one
and cost test monthly is the b7ab one
the reason you have multiple is because you probably have multi entity config nodes
well I got rid of the multiple listed ha servers, found out that happens when you import examples
hasn't done anything to fix the sensor nodes freaking out about the addon not being there though
when it is, that's how I just got this
in the two sensor nodes the entity_id needs to be changed to the correct ones are I wasn't sure which ones were referenced in teh image
payload + $number($entities("sensor.cost_test_daily").state)
also in the sensor entity configs need to have "resend" checked
hmm, I can't actually test organically anymore though as the battery is depleted
so it'll have to wait until the sun comes up
okay I forced it with an inject node, so you have the actual sensor nodes themselves just doing the summing now?
the monthly one is reporting a json error tho
yes
what's the error
"JSONataError: Unable to cast value to a number: "unavailable""
that's the friendly name of the sensor tho, it can't be anything else
there's so many duplicates though, am I able to just delete them all and start again making new sensors?
oh okay, I've never done json stuff before that's why I was doing everything with nodes
you can do whatever works for you. atleast you can understand it
obviously I can't really test it until the sun comes up so I'll keep an eye on it