2021-03-01 17:07:09 ERROR (MainThread) [homeassistant.components.automation.lora_gps_tracker] Error while executing automation automation.lora_gps_tracker: invalid latitude for dictionary value @ data['gps']
I’ve searched high and low, and found other forum posts, but nothing has helped.
If i run this through developer tools and change from a template to raw numbers, it works fine. e.g. below
Didnt realise that on the dev tools - feature request?
The script worked!
Ran it off the existing tracker state_attr, as my lora device is offline at the moment, and 2 hours away.
I was testing it purely in automation for a while, so not sure why it wasn’t working then. Any reason why it wouldnt work in an automation, instead of having an automation triggering a script?
Maybe the lora sensor value isn’t usable, buts just a float value so I must have stuffed something up in the config. When its back online, i’ll check using it and loop back tomorrow.
If it works in the script it will work in an automation. Copy and paste the service and data back into your automation.
I can’t say why it wasn’t working before, only to say that there must have been a syntax error somewhere that none of us were spotting, which is why I suggested using some code that I freshly wrote so I knew it was syntactically correct, and putting it in a script to make sure you didn’t ‘cheat’ and try editing your old automation rather than importing the code I wrote.
Thanks for this! Is there a way to set the tracker itself to unavailable (instead of home/away) in case the lora device is offline (not sending position updates for a while)?