Skip to content

Commit 272b52a

Browse files
committed
iCloud3 v3.1.6.1
1 parent 0a979de commit 272b52a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+453
-215
lines changed

custom_components/icloud3/Release Notes.txt

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,30 @@ v3.1.5b1 Removed, Replaced with v3.1.5b2 [here](https://github.com/gcobb321/iclo
77

88

99

10-
### Release Notes - v3.1.6
10+
### Release Notes - v3.1.7
1111
#### 🎉 Improvements and New Features
12-
1. When the password is used to authenticate the Apple Account, Apple sends an email to the account owner that a login/authentication was done. An entry has been added to the Event Log when iCloud3 doe this. The authentication date/time (PST) in the Event Log message is, hopefully, the same as on the email. View on _Event Log > Show Startup log, Errors & Alerts_. Note: The times the _Event Log_ and email may not match.
12+
1. _Configure > Update Devices_ screen - Added an Action option to open a new screen to update the rarely updated parameters (inzone interval, log zone, track-from-zone, etc).
13+
14+
#### 🐛 Bug Fixes
15+
1. Fixed a problem restarting after an Internet Connection Error occurred. iCloud3 would get stuck in a loop displaying a 'Paused/Resumed' message on the Event Log and tracking would stop.
16+
2. Event Log - Fixed a problem building the Configure Button URL (THIS CAUSES A BROWSER REFRESH MSG ON ALL DEVICES).
17+
3. Fixed a problem sending a notification to an iPhone that no data has been received from the Mobile App for over 6-hours.
18+
4. Fixed a problem where changes to a device's Friendly Name were not updating the sensors Friendly Name correctly.
19+
20+
21+
### Release Notes - v3.1.6 (2/22/2025)
22+
#### 🎉 Improvements and New Features
23+
1. Apple sends an email to the account owner that a login/authentication was done when the password is used to authenticate the Apple Account. A note is now added to the Event Log when this occurs showing the authentication date/time (PST) in the Event Log message. Hopefully, the time on the email is the same as the login (but it probably will not be). All password logins can be viewed on _Event Log > Show Startup log, Errors & Alerts_.
1324
2. The Apple Account username is now obscured in the iCloud3 log files.
1425
3. The _Data Sources_ ... screen name was changed to _Apple Accounts & Mobile App_ for clarity.
15-
4. Formatting improvements to the _Apple Accounts & Mobile App screen.
26+
4. Formatting improvements to the _Apple Accounts & Mobile App_ screen.
1627
5. The Apple Server Location can now be selected by Apple Account (Applies to China users).
1728
6. Messages are no longer sent to a phone when there is an Internet Connection error. Phones were being hammered with messages when the Internet connection would cycle between an offline and online state.
1829
7. When Pausing all tracking, the time paused and age is now displayed in the Event Log.
1930

2031
#### 🐛 Bug Fixes
2132
1. When iCloud3 started and was setting up the tracked devices, if the Mobile App device parameter was set to 'ScanFor a device' and that device was not found in the list of Mobile App devices, an error was aborting the setup process. This resulted in no Apple account or Mobile App devices being set up correctly. This has been fixed.
22-
2. Fixed some problems with accessing Apple Servers in China where the .cn URL suffix was not being appended correctly.
33+
2. Fixed some problems accessing Apple Servers in China where the .cn URL suffix was not being appended correctly.
2334
3. Fixed a problem displaying all of the Apple Accounts when multiple Apple Accounts were set up and the first one was not logged into.
2435

2536
#### ☕ Buy me a Coffee

custom_components/icloud3/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
170170
# config_file.count_lines_of_code(Gb.icloud3_directory)
171171
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172172
try:
173+
# _log(f"{Gb.hass.data['lovelace']=}")
174+
# dashboard = Gb.hass.data['lovelace'].dashboards['icloud3']
175+
# #_log(f"{dashboard.__dict__=}")
176+
# _log(f"{dashboard.config=}")
177+
# _log(f"{dashboard._data=}")
173178

174179
pass
175180

custom_components/icloud3/config_flow.py

Lines changed: 167 additions & 99 deletions
Large diffs are not rendered by default.

custom_components/icloud3/config_flow_forms.py

Lines changed: 115 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from .global_variables import GlobalVariables as Gb
1111
from .const import (RED_ALERT, LINK, RLINK, RARROW,
12-
IPHONE, IPAD, WATCH, AIRPODS, ICLOUD, OTHER,
12+
IPHONE, IPAD, WATCH, AIRPODS, ICLOUD, OTHER, HOME, NONE,
1313
DEVICE_TYPE_FNAME, DEVICE_TYPE_FNAMES, MOBAPP, NO_MOBAPP,
1414
INACTIVE_DEVICE, HOME_DISTANCE,
1515
PICTURE_WWW_STANDARD_DIRS, CONF_PICTURE_WWW_DIRS,
@@ -619,24 +619,35 @@ def form_add_device(self):
619619
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
620620
def form_update_device(self):
621621

622+
# Build Other Tracking Parameters values text
623+
log_zones_fnames = [zone_dname(zone) for zone in self.conf_device[CONF_LOG_ZONES] if zone.startswith('name') is False]
624+
tfz_fnames = [zone_dname(zone) for zone in self.conf_device[CONF_TRACK_FROM_ZONES]]
625+
device_type_fname = DEVICE_TYPE_FNAME(self._parm_or_device(CONF_DEVICE_TYPE))
626+
otp_msg = (f"Type ({device_type_fname}), "
627+
f"inZoneInterval ({format_timer(self.conf_device[CONF_INZONE_INTERVAL]*60)})")
628+
otp_msg += ", FixedInterval"
629+
if self.conf_device[CONF_FIXED_INTERVAL] > 0:
630+
otp_msg += f" ({format_timer(self.conf_device[CONF_FIXED_INTERVAL]*60)})"
631+
otp_msg += ", LogZones"
632+
if self.conf_device[CONF_LOG_ZONES] != [NONE]:
633+
otp_msg += f" ({list_to_str(log_zones_fnames)})"
634+
otp_msg += ", TrackFromZone"
635+
if self.conf_device[CONF_TRACK_FROM_ZONES] != [HOME]:
636+
otp_msg += f" ({list_to_str(tfz_fnames)})"
637+
otp_msg += ", PrimaryTrackFromZone"
638+
if self.conf_device[CONF_TRACK_FROM_BASE_ZONE] != HOME:
639+
otp_msg += f" ({zone_dname(self.conf_device[CONF_TRACK_FROM_BASE_ZONE])})"
640+
otp_action_item = ACTION_LIST_OPTIONS[
641+
'update_other_device_parameters'].replace('^otp_msg', otp_msg)
642+
622643
error_key = ''
623644
self.errors = self.errors or {}
624645
self.actions_list = []
646+
self.actions_list.append(otp_action_item)
625647
self.actions_list.append(ACTION_LIST_OPTIONS['save'])
626648
self.actions_list.append(ACTION_LIST_OPTIONS['cancel_goto_menu'])
627649
self.actions_list.append(ACTION_LIST_OPTIONS['cancel_goto_select_device'])
628650

629-
# Display Advanced Tracking Parameters
630-
log_zones_fnames = [zone_dname(zone) for zone in self.conf_device[CONF_LOG_ZONES] if zone.startswith('Name') is False]
631-
tfz_fnames = [zone_dname(zone) for zone in self.conf_device[CONF_TRACK_FROM_ZONES]]
632-
device_type_fname = DEVICE_TYPE_FNAME(self._parm_or_device(CONF_DEVICE_TYPE))
633-
RARELY_UPDATED_PARMS_HEADER = ( f"DeviceType ({device_type_fname}), "
634-
f"inZoneInterval ({format_timer(self.conf_device[CONF_INZONE_INTERVAL]*60)}), "
635-
f"FixedInterval ({format_timer(self.conf_device[CONF_FIXED_INTERVAL]*60)}), "
636-
f"LogFromZones ({list_to_str(log_zones_fnames)}), "
637-
f"Track-from-Zone ({list_to_str(tfz_fnames)}), "
638-
f"PrimaryTrackFromZone ({zone_dname(self.conf_device[CONF_TRACK_FROM_BASE_ZONE])})")
639-
atp_default = [RARELY_UPDATED_PARMS_HEADER] if self.display_rarely_updated_parms else []
640651

641652
devicename = self._parm_or_device(CONF_IC3_DEVICENAME)
642653
icloud3_fname = self._parm_or_device(CONF_FNAME) or ' '
@@ -725,23 +736,85 @@ def form_update_device(self):
725736
options=dict_value_to_list(TRACKING_MODE_OPTIONS), mode='dropdown')),
726737
})
727738

728-
if self.display_rarely_updated_parms is False:
729-
schema.update({
730-
vol.Optional(RARELY_UPDATED_PARMS,
731-
default=atp_default):
732-
cv.multi_select([RARELY_UPDATED_PARMS_HEADER]),
733-
})
739+
# if self.display_rarely_updated_parms is False:
740+
# schema.update({
741+
# vol.Optional(RARELY_UPDATED_PARMS,
742+
# default=atp_default):
743+
# cv.multi_select([RARELY_UPDATED_PARMS_HEADER]),
744+
# })
745+
746+
# if self.display_rarely_updated_parms:
747+
# device_type_fname = DEVICE_TYPE_FNAME(self._parm_or_device(CONF_DEVICE_TYPE))
748+
# schema.update({
749+
# vol.Required(CONF_DEVICE_TYPE,
750+
# default=self._option_parm_to_text(CONF_DEVICE_TYPE, DEVICE_TYPE_FNAMES)):
751+
# selector.SelectSelector(selector.SelectSelectorConfig(
752+
# options=dict_value_to_list(DEVICE_TYPE_FNAMES), mode='dropdown')),
753+
# vol.Required(CONF_INZONE_INTERVAL,
754+
# default=self.conf_device[CONF_INZONE_INTERVAL]):
755+
# # default=self._parm_or_device(CONF_INZONE_INTERVAL)):
756+
# selector.NumberSelector(selector.NumberSelectorConfig(
757+
# min=5, max=480, step=5, unit_of_measurement='minutes')),
758+
# vol.Required(CONF_FIXED_INTERVAL,
759+
# default=self.conf_device[CONF_FIXED_INTERVAL]):
760+
# selector.NumberSelector(selector.NumberSelectorConfig(
761+
# min=0, max=480, step=5, unit_of_measurement='minutes')),
762+
# vol.Optional(CONF_LOG_ZONES,
763+
# default=self._parm_or_device(CONF_LOG_ZONES)):
764+
# cv.multi_select(six_item_dict(log_zones_key_text)),
765+
# vol.Required(CONF_TRACK_FROM_ZONES,
766+
# default=self._parm_or_device(CONF_TRACK_FROM_ZONES)):
767+
# cv.multi_select(six_item_dict(self.zone_name_key_text)),
768+
# #cv.multi_select(self.zone_name_key_text),
769+
# vol.Required(CONF_TRACK_FROM_BASE_ZONE,
770+
# default=self._option_parm_to_text(CONF_TRACK_FROM_BASE_ZONE,
771+
# self.zone_name_key_text, conf_device=True)):
772+
# selector.SelectSelector(selector.SelectSelectorConfig(
773+
# options=dict_value_to_list(self.zone_name_key_text), mode='dropdown')),
774+
# })
734775

735-
if self.display_rarely_updated_parms:
736-
device_type_fname = DEVICE_TYPE_FNAME(self._parm_or_device(CONF_DEVICE_TYPE))
737-
schema.update({
776+
schema.update({
777+
vol.Required('action_items',
778+
default=self.action_default_text('save')):
779+
selector.SelectSelector(selector.SelectSelectorConfig(
780+
options=self.actions_list, mode='list')),
781+
})
782+
783+
return vol.Schema(schema)
784+
785+
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
786+
# UPDATE OTHER DEVICE PARAMETERS
787+
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
788+
def form_update_other_device_parameters(self):
789+
790+
# Display Advanced Tracking Parameters
791+
# log_zones_fnames = [zone_dname(zone) for zone in self.conf_device[CONF_LOG_ZONES] if zone.startswith('Name') is False]
792+
# tfz_fnames = [zone_dname(zone) for zone in self.conf_device[CONF_TRACK_FROM_ZONES]]
793+
# device_type_fname = DEVICE_TYPE_FNAME(self._parm_or_device(CONF_DEVICE_TYPE))
794+
# RARELY_UPDATED_PARMS_HEADER = ( f"DeviceType ({device_type_fname}), "
795+
# f"inZoneInterval ({format_timer(self.conf_device[CONF_INZONE_INTERVAL]*60)}), "
796+
# f"FixedInterval ({format_timer(self.conf_device[CONF_FIXED_INTERVAL]*60)}), "
797+
# f"LogFromZones ({list_to_str(log_zones_fnames)}), "
798+
# f"Track-from-Zone ({list_to_str(tfz_fnames)}), "
799+
# f"PrimaryTrackFromZone ({zone_dname(self.conf_device[CONF_TRACK_FROM_BASE_ZONE])})")
800+
# atp_default = [RARELY_UPDATED_PARMS_HEADER] if self.display_rarely_updated_parms else []
801+
802+
self.actions_list = []
803+
self.actions_list.append(ACTION_LIST_OPTIONS['save'])
804+
self.actions_list.append(ACTION_LIST_OPTIONS['cancel_goto_previous'])
805+
806+
log_zones_key_text = {'none': 'None'}
807+
log_zones_key_text.update(self.zone_name_key_text)
808+
log_zones_key_text.update(LOG_ZONES_KEY_TEXT)
809+
810+
device_type_fname = DEVICE_TYPE_FNAME(self._parm_or_device(CONF_DEVICE_TYPE))
811+
return vol.Schema({
738812
vol.Required(CONF_DEVICE_TYPE,
739813
default=self._option_parm_to_text(CONF_DEVICE_TYPE, DEVICE_TYPE_FNAMES)):
740814
selector.SelectSelector(selector.SelectSelectorConfig(
741815
options=dict_value_to_list(DEVICE_TYPE_FNAMES), mode='dropdown')),
742816
vol.Required(CONF_INZONE_INTERVAL,
743817
default=self.conf_device[CONF_INZONE_INTERVAL]):
744-
# default=self._parm_or_device(CONF_INZONE_INTERVAL)):
745818
selector.NumberSelector(selector.NumberSelectorConfig(
746819
min=5, max=480, step=5, unit_of_measurement='minutes')),
747820
vol.Required(CONF_FIXED_INTERVAL,
@@ -754,44 +827,37 @@ def form_update_device(self):
754827
vol.Required(CONF_TRACK_FROM_ZONES,
755828
default=self._parm_or_device(CONF_TRACK_FROM_ZONES)):
756829
cv.multi_select(six_item_dict(self.zone_name_key_text)),
757-
#cv.multi_select(self.zone_name_key_text),
758830
vol.Required(CONF_TRACK_FROM_BASE_ZONE,
759831
default=self._option_parm_to_text(CONF_TRACK_FROM_BASE_ZONE,
760832
self.zone_name_key_text, conf_device=True)):
761833
selector.SelectSelector(selector.SelectSelectorConfig(
762834
options=dict_value_to_list(self.zone_name_key_text), mode='dropdown')),
763-
})
764835

765-
schema.update({
766836
vol.Required('action_items',
767-
default=self.action_default_text('save')):
768-
selector.SelectSelector(selector.SelectSelectorConfig(
769-
options=self.actions_list, mode='list')),
770-
})
771-
772-
return vol.Schema(schema)
837+
default=self.action_default_text('save')):
838+
selector.SelectSelector(selector.SelectSelectorConfig(
839+
options=self.actions_list, mode='list')),
840+
})
773841

774842

775843
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
776-
# DELETE DEVICE
844+
# DASHBOARD BUILDER
777845
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
778-
# def form_delete_device(self):
779-
# self.actions_list = DEVICE_DELETE_ACTIONS.copy()
780-
# device_text = ( f"{self.conf_device[CONF_FNAME]} "
781-
# f"({self.conf_device[CONF_IC3_DEVICENAME]})")
782-
# device_selected = self.device_items_list[self.conf_device_idx]
783-
784-
# # The first item is 'Delete this device, add the selected device's info
785-
# return vol.Schema({
786-
# vol.Required('device_selected',
787-
# default=device_selected):
788-
# selector.SelectSelector(selector.SelectSelectorConfig(
789-
# options=[device_selected], mode='list')),
790-
# vol.Required('action_items',
791-
# default=self.action_default_text('delete_device_cancel')):
792-
# selector.SelectSelector(
793-
# selector.SelectSelectorConfig(options=self.actions_list, mode='list')),
794-
# })
846+
def form_dashboard_builder(self):
847+
self.actions_list = ACTION_LIST_ITEMS_BASE.copy()
848+
action_default = 'cancel_goto_menu'
849+
850+
851+
return vol.Schema({
852+
# vol.Optional('under_construction',
853+
# default='Under Construction'):
854+
# cv.multi_select(['Under Construction']),
855+
vol.Required('action_items',
856+
default=self.action_default_text(action_default)):
857+
selector.SelectSelector(
858+
selector.SelectSelectorConfig(options=self.actions_list, mode='list')),
859+
})
860+
795861

796862
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
797863
# TOOLS

custom_components/icloud3/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# from homeassistant.const import (Platform)
1414

15-
VERSION = '3.1.6'
15+
VERSION = '3.1.6.1'
1616
VERSION_BETA = ''
1717
#-----------------------------------------
1818
DOMAIN = 'icloud3'

custom_components/icloud3/const_config_flow.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@
1212
'data_source': 'APPLE ACCOUNTS & MOBILE APP > Add, Change and Delete Apple Accounts, Enable Monitoring the Mobile App ',
1313
'device_list': 'ICLOUD3 DEVICES > Add, Change and Delete Tracked and Monitored Devices',
1414
'verification_code': 'ENTER/REQUEST AN APPLE ACCOUNT VERIFICATION CODE > Enter or Request the 6-digit Apple Account Verification Code',
15-
'away_time_zone': 'AWAY TIME ZONE > Select the displayed time zone for devices away from Home',
1615
'change_device_order': 'CHANGE DEVICE ORDER > Change the Event Log Device display and tracking update sequence',
1716
'sensors': 'SENSORS > Set Sensors created by iCloud3, Exclude Specific Sensors from being created',
17+
'dashboard_builder': 'DASHBOARD BUILDER > Build a Lovelace Dashboard with tracked devices and the Event Log',
1818
'tools': 'TOOLS > Log Level, Delete Apple Acct & Device Assignment, Delete Apple Acct Cookie & iCloud3 Config files, Repair sensor ‘_2’ entity name errors, Restart HA/Reload iCloud3',
1919

20+
'away_time_zone': 'AWAY TIME ZONE > Select the displayed time zone for devices away from Home',
2021
'tracking_parameters': 'TRACKING PARAMETERS > Nearby Device Info, Accuracy Thresholds & Other Location Request Intervals',
2122
'format_settings': 'FIELD FORMATS & OTHER PARAMETERS > Zone Display & Device Tracker State formats, Unit of Measure/Time & Distance formats, Picture Dir Filters, Event Log Overrides, etc',
2223
'display_text_as': 'DISPLAY TEXT AS > Event Log Text Replacement',
@@ -36,10 +37,12 @@
3637
MENU_KEY_TEXT['verification_code'],
3738
MENU_KEY_TEXT['away_time_zone'],
3839
MENU_KEY_TEXT['sensors'],
40+
# MENU_KEY_TEXT['dashboard_builder'],
3941
MENU_KEY_TEXT['tools'],
4042
]
4143
MENU_PAGE_1_INITIAL_ITEM = 0
4244
MENU_KEY_TEXT_PAGE_1 = [
45+
# MENU_KEY_TEXT['away_time_zone'],
4346
MENU_KEY_TEXT['tracking_parameters'],
4447
MENU_KEY_TEXT['format_settings'],
4548
MENU_KEY_TEXT['display_text_as'],
@@ -75,6 +78,7 @@
7578
'add_device': 'ADD DEVICE > Continue to the `‘Update Devices`’ screen to finish setting up the new device',
7679
'delete_device': 'DELETE DEVICE > Delete the selected device',
7780
'change_device_order': 'CHANGE DEVICE ORDER > Change the tracking order of the Devices and their display sequence on the Event Log',
81+
'update_other_device_parameters': 'UPDATE OTHER DEVICE PARAMETERS > (^otp_msg)',
7882

7983
'inactive_to_track': 'TRACK ALL OR SELECTED > Change the `Tracking Mode‘ of all of the devices (or the selected devices) from `Inactive‘ to `Tracked‘',
8084
'inactive_keep_inactive': 'DO NOT TRACK, KEEP INACTIVE > None of these devices should be `Tracked‘ and should remain `Inactive‘',
Loading
Loading

0 commit comments

Comments
 (0)