diff --git a/README.md b/README.md index 5c1393c..825755d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Welcome to iCloud3 v2.4! -[![CurrentVersion](https://img.shields.io/badge/Current_Version-v2.4.6-blue.svg)](https://github.com/gcobb321/icloud3) -[![Released](https://img.shields.io/badge/Released-October,_2021-blue.svg)](https://github.com/gcobb321/icloud3) +[![CurrentVersion](https://img.shields.io/badge/Current_Version-v2.4.7-blue.svg)](https://github.com/gcobb321/icloud3) +[![Released](https://img.shields.io/badge/Released-December,_2021-blue.svg)](https://github.com/gcobb321/icloud3) [![ProjectStage](https://img.shields.io/badge/Project_Stage-General_Availability-red.svg)](https://github.com/gcobb321/icloud3) [![Type](https://img.shields.io/badge/Type-Custom_Component-orange.svg)](https://github.com/gcobb321/icloud3) [![HACS](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/gcobb321/icloud3) diff --git a/custom_components/icloud3/device_tracker.py b/custom_components/icloud3/device_tracker.py index 4efa692..badb750 100644 --- a/custom_components/icloud3/device_tracker.py +++ b/custom_components/icloud3/device_tracker.py @@ -22,9 +22,12 @@ #pylint: disable=unused-argument, unused-variable #pylint: disable=too-many-instance-attributes, too-many-lines -VERSION = '2.4.6' +VERSION = '2.4.7' ''' +v2.4.7 (12/27/2011) +1. Fixes a Waze Route Tracking issue where no information or an error was reported from Waze Servers. This was caused by a variable name change on the Waze side. + v2.4.6 (10/11/2021) 1. Changed the icon for zones from mdi:cellphone-iphone to mdi:cellphone because of Home Assistant mdi update. 2. Changed the sensor state values for Travel Time, Distance, Next Update Time, etc. from an empty field to a value to address a Lovelace display change. The fields that were empty were not alligned with the field next to them. Travel Time will now display 0 min when in a zone. Other fields will display '___' when empty. @@ -8012,6 +8015,9 @@ def _save_event(self, devicename, event_text): travel_time = self.last_tavel_time.get(devicename_zone, '') distance = self.last_distance_str.get(devicename_zone, '') + travel_time = travel_time.replace('0 min', '') + distance = distance.replace('0 mi', '').replace('0 km', '') + if (instr(type(event_text), 'dict') or instr(type(event_text), 'list')): event_text = str(event_text) diff --git a/custom_components/icloud3/waze_route_calc_ic3.py b/custom_components/icloud3/waze_route_calc_ic3.py index ec50bb7..615123d 100644 --- a/custom_components/icloud3/waze_route_calc_ic3.py +++ b/custom_components/icloud3/waze_route_calc_ic3.py @@ -142,7 +142,7 @@ def calc_route_info(self, from_lat, from_long, to_lat, to_long): route = self.get_route(from_lat, from_long, to_lat, to_long) - route_time, route_distance = self._add_up_route(route['result']) + route_time, route_distance = self._add_up_route(route['results']) self.log.info(f"Location: From-({from_lat:0.5f}, {from_long:0.5f}), To-({to_lat:0.5f}, {to_long:0.5f}), Region-{self.region}") self.log.info(f"Results : Time-{route_time:0.2f}min, Distance-{route_distance:0.2f}km") diff --git a/development-v2.4.6/icloud3-v2.4.6.zip b/development-v2.4.6/icloud3-v2.4.6.zip deleted file mode 100644 index 3c9c3a1..0000000 Binary files a/development-v2.4.6/icloud3-v2.4.6.zip and /dev/null differ diff --git a/development-v2.4.6/device_tracker.py b/development-v2.4.7/device_tracker.py similarity index 99% rename from development-v2.4.6/device_tracker.py rename to development-v2.4.7/device_tracker.py index 4efa692..badb750 100644 --- a/development-v2.4.6/device_tracker.py +++ b/development-v2.4.7/device_tracker.py @@ -22,9 +22,12 @@ #pylint: disable=unused-argument, unused-variable #pylint: disable=too-many-instance-attributes, too-many-lines -VERSION = '2.4.6' +VERSION = '2.4.7' ''' +v2.4.7 (12/27/2011) +1. Fixes a Waze Route Tracking issue where no information or an error was reported from Waze Servers. This was caused by a variable name change on the Waze side. + v2.4.6 (10/11/2021) 1. Changed the icon for zones from mdi:cellphone-iphone to mdi:cellphone because of Home Assistant mdi update. 2. Changed the sensor state values for Travel Time, Distance, Next Update Time, etc. from an empty field to a value to address a Lovelace display change. The fields that were empty were not alligned with the field next to them. Travel Time will now display 0 min when in a zone. Other fields will display '___' when empty. @@ -8012,6 +8015,9 @@ def _save_event(self, devicename, event_text): travel_time = self.last_tavel_time.get(devicename_zone, '') distance = self.last_distance_str.get(devicename_zone, '') + travel_time = travel_time.replace('0 min', '') + distance = distance.replace('0 mi', '').replace('0 km', '') + if (instr(type(event_text), 'dict') or instr(type(event_text), 'list')): event_text = str(event_text) diff --git a/development-v2.4.6/iCloud3 v2.4.6 Change Log.txt b/development-v2.4.7/iCloud3 v2.4.7 Change Log.txt similarity index 89% rename from development-v2.4.6/iCloud3 v2.4.6 Change Log.txt rename to development-v2.4.7/iCloud3 v2.4.7 Change Log.txt index 4f7e8a8..6798e14 100644 --- a/development-v2.4.6/iCloud3 v2.4.6 Change Log.txt +++ b/development-v2.4.7/iCloud3 v2.4.7 Change Log.txt @@ -1,3 +1,5 @@ +v2.4.7 (12/27/2011) +1. Fixes a Waze Route Tracking issue where no information or an error was reported from Waze Servers. This was caused by a variable name change on the Waze side. v2.4.6 (10/11/2021) 1. Changed the icon for zones from mdi:cellphone-iphone to mdi:cellphone because of Home Assistant mdi update. diff --git a/development-v2.4.6/manifest.json b/development-v2.4.7/manifest.json similarity index 100% rename from development-v2.4.6/manifest.json rename to development-v2.4.7/manifest.json diff --git a/development-v2.4.6/pyicloud_ic3.py b/development-v2.4.7/pyicloud_ic3.py similarity index 100% rename from development-v2.4.6/pyicloud_ic3.py rename to development-v2.4.7/pyicloud_ic3.py diff --git a/development-v2.4.6/waze_route_calc_ic3.py b/development-v2.4.7/waze_route_calc_ic3.py similarity index 99% rename from development-v2.4.6/waze_route_calc_ic3.py rename to development-v2.4.7/waze_route_calc_ic3.py index ec50bb7..615123d 100644 --- a/development-v2.4.6/waze_route_calc_ic3.py +++ b/development-v2.4.7/waze_route_calc_ic3.py @@ -142,7 +142,7 @@ def calc_route_info(self, from_lat, from_long, to_lat, to_long): route = self.get_route(from_lat, from_long, to_lat, to_long) - route_time, route_distance = self._add_up_route(route['result']) + route_time, route_distance = self._add_up_route(route['results']) self.log.info(f"Location: From-({from_lat:0.5f}, {from_long:0.5f}), To-({to_lat:0.5f}, {to_long:0.5f}), Region-{self.region}") self.log.info(f"Results : Time-{route_time:0.2f}min, Distance-{route_distance:0.2f}km") diff --git a/docs/CHANGELOG-v2.4.md b/docs/CHANGELOG-v2.4.md index 06d9df2..1d115d1 100644 --- a/docs/CHANGELOG-v2.4.md +++ b/docs/CHANGELOG-v2.4.md @@ -7,6 +7,10 @@ The following enhancements and changes have been made iCloud3: ------ +### v2.4.7 (12/27/2011) - Fix Waze Issue + +1. Fixes a Waze Route Tracking issue where no information or an error was reported from Waze Servers. This was caused by a variable name change on the Waze side. + ### v2.4.6 (10/11/2021) - HA cellphone icon update, Lovelace Sensor Alignment, Increase Waze retry count 1. Changed the icon for zones from mdi:cellphone-iphone to mdi:cellphone because of Home Assistant mdi update. diff --git a/docs/README.md b/docs/README.md index 397af35..17af14b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,7 @@ # iCloud3 Device Tracker Custom Component -[![CurrentVersion](https://img.shields.io/badge/Current_Version-v2.4.6-blue.svg)](https://github.com/gcobb321/icloud3) -[![Released](https://img.shields.io/badge/Released-October,_2021-blue.svg)](https://github.com/gcobb321/icloud3) +[![CurrentVersion](https://img.shields.io/badge/Current_Version-v2.4.7-blue.svg)](https://github.com/gcobb321/icloud3) +[![Released](https://img.shields.io/badge/Released-December,_2021-blue.svg)](https://github.com/gcobb321/icloud3) [![ProjectStage](https://img.shields.io/badge/Project_Stage-General_Availability-red.svg)](https://github.com/gcobb321/icloud3) [![Type](https://img.shields.io/badge/Type-Custom_Component-orange.svg)](https://github.com/gcobb321/icloud3) [![HACS](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/gcobb321/icloud3) diff --git a/docs/_sidebar.md b/docs/_sidebar.md index d2292ac..50acb23 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -12,14 +12,14 @@
- Version: 2.4.6, October, 2021 + Version: 2.4.7, December, 2021
- What's New and What Changed - - [Changes and new Features - v2.4.6](CHANGELOG-v2.4.md) + - [Changes and new Features - v2.4.7](CHANGELOG-v2.4.md) - Welcome to iCloud3 - [1.0 Introduction](README.md) - [1.1 Quick Start Guide](chapters/1.1-quick-start-guide.md) diff --git a/icloud3.zip b/icloud3.zip index 0bc0474..e2004da 100644 Binary files a/icloud3.zip and b/icloud3.zip differ