State trigger with time didn't trigger

It happened - the state trigger didn’t trigger and my wifes car is now at 10% battery!

Template:

{{ state_attr('sensor.ev_smart_charging_volkswagen_charging', 'Charging start time') }}

Any suggestions on how I can improve this?

cc @heyyitsal @steffanlm

Not sure what went wrong but it seems the states is “invalid” in your TESLA and VW START OFFSET.

You need to validate the input to your sensor, so you are sure you always have a valid sensor output to NodeRED.

Can you please elaborate on that? It updates automatically when I get a new value? It also gets invalid everytime I hit “deploy” and it’s out of scope.

It checks the state of a certain sensor, which updates every 24 (maybe 12, not sure) hours. Like right now I see this:

image

This is the helper:

{{ state_attr('sensor.ev_smart_charging_charging', 'Charging start time') }}

To be honest, I’ve never used that node - thought it was a sensor reading from Home Assistant you were struggling with.

I would have set up a “events: state” node to read out the sensor data instead, and set in some delay nodes in your flow instead. In “events: state” you can set some checkmarks to ignore certain state changes - else I would go all in, in a “function” node to program it all in Javascript :slight_smile:

1 Like