New Features and behind the scenes rework
-
It was becoming very hard to manage all of the attributes with their internal and external names. It was redesigned to use a Dictionary to store the attributes so that there is only one name for each attribute. I've tried to ensure that this change is essentially invisible to everyone but makes it much easier to manage going forward. I also updated the class of the places sensor to be a Sensor class.
-
Sensor state and attributes will persist through a Home Assistant reboot.
- This should "fail gracefully" if it is unable to write or read the sensor status file, but please open an issue if it isn't working and especially if it is crashing the places sensor.
-
Updated formatted_place to show the route number (but only if it contains a number) for highways instead of the official name if it exists.
- Please open an issue if you find any roads that display weirdly. Please provide the OpenStreetMap URL from the Debug Logs.
- I could make this an option for the display options and/or for formatted_place instead of always on for formatted_place if desired.
Changelog
- Add Default Icon for the sensor
in #104
- Change from Entity to SensorEntity Class in #105
- Simplify code to use a dict for attributes instead of separate variables in #109
- Move code into functions in Snuffy2#162
- Store sensor states in JSON files to keep state on reboot by in #106
- Update JSON Import to identify not-imported attributes for debugging in #107
- Add GPS accuracy as attribute and only update the sensor if GPS accuracy is >0 if it exists in #108
- If there are devicetracker_ids that work but have GPS Accuracy as 0, this could become an option.
- Add miles attributes for measurements in #110
- Show friendly name and entity id in config dropdowns in #111
- Add last_updated as attribute in #114
- Use highway number (ex. I 95) in formatted place for highways if it exists in #115
- Fix place_name to populate even if places is not in display options and ignore it it in formatted_place if it duplicates other attributes in #116
Full Changelog: v2.1.0...v2.2.0