-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: fix Home Assistant MQTT sensor JSON templates warnings #4257
docs: fix Home Assistant MQTT sensor JSON templates warnings #4257
Conversation
More gracefully handles JSONs with error (not actively routing)
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Conditionally convert values if the sensor actually has a value, to prevent converting invalid non-numeric values
tested successfully here (updated mqtt_sensors.yaml, restarted home_assistant, no errors in logs). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but a bit puzzled about the changes from multiple to divide in some places.
@JakobLichterfeld not sure why the CI failed, can you retry please |
Yeah, GitHub Runners have been slow yesterday and caused lots of failures, not related to your PR. Today it runs fine. |
123f7ab
into
teslamate-org:master
* Fix Home Assistant active route MQTT sensor JSON templates More gracefully handles JSONs with error (not actively routing) * Fix tesla_active_route_distance_to_arrival_km sensor * Fix template sensors Conditionally convert values if the sensor actually has a value, to prevent converting invalid non-numeric values * Fix copy/paste mistakes
Fixes #4247
More gracefully handles
teslamate/cars/1/active_route
topic JSON when the car is not routing, thejson_attributes_template
would cause a Home Assistant warning since we're trying to access properties on the JSON that aren't there.MQTT topic
active_route
Home Assistant logs
Also fix other template sensor errors mentioned in #4247 (comment) which are unrelated to the active route error but a similar issue where the template reference other MQTT sensor numeric values which may be invalid/unavailable, which causes a warning when trying to use math expressions on.