diff --git a/custom_components/icloud3/ChangeLog.txt b/custom_components/icloud3/ChangeLog.txt index c73e8e8..cef5df5 100644 --- a/custom_components/icloud3/ChangeLog.txt +++ b/custom_components/icloud3/ChangeLog.txt @@ -3,15 +3,21 @@ **Installing for the first time_** - See [here](https://gcobb321.github.io/icloud3_v3_docs/#/chapters/3.2-installing-and-configuring) for instructions on installing as a New Installation **iCloud3 v3 Documentation** - iCloud3 User Guide can be found [here](https://gcobb321.github.io/icloud3_v3_docs/#/) -3.0.5 + +3.0.5.1 ....................... -### Change Log - v3.0.4 (5/18/2024) +### Change Log - v3.0.5.1 (5/25/2024) +1. MOBILE APP (Fix) - Fixed a problem where the device's Mobile App data source would be disabled (reset to NotUsed) if the HA Mobile App Integration was set up after the Mobile App's initial locate had been completed. +2. TRANSLATION FILE (new) - Added Chinese (Simplified) translation (@MagicStarTrace) + +### Change Log - v3.0.5 (5/18/2024) 1. HACS UPUDATE ALERT (New) - The HACS Integration information will be check on a regular basis to see if a newer version of iCloud3 is available. 2. ICLOUD ACCOUNT AUTHENTICATION/FAMSHR DEVICES LIST (Fixed) - During startup ("Stage 4), the iCloud Account access is set up and the devices in the Family Sharing List is read. If a problem occurred, iCloud3 would retry this 10-times to see if the error was corrected. However, the FamShr data was not being reread and the old data was being used. The FamShr data is now reread correctly when trying to recover from this error. 3. UPDATE DEVICES SCREEN (Fixed) - When upgrading a device (iPhone, iPad, Watch) and both the old and new devices are still in the Family Sharing List, the new device was being set back to the old device the next time iCloud3 was started. 4. LOCKED ICLOUD ACCOUNT (New) - An error message is displayed in the HA logs and on the Event Log if the iCloud account is locked. 5. EVENT LOG (Fix) - An 'Unbound event_recd' error would display when the length of the the event text > 2000 characters (@ehendrix23). + v3.0.4 ....................... ### Change Log - v3.0.4 (5/11/2024) diff --git a/custom_components/icloud3/const.py b/custom_components/icloud3/const.py index cf203b6..adbdfdb 100644 --- a/custom_components/icloud3/const.py +++ b/custom_components/icloud3/const.py @@ -3,8 +3,14 @@ # Define the iCloud3 General Constants # #<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +# +# Translations: +# en - @gcobb321 (Gary Cobb, iCloud3 author) +# zh-Hans - @MagicStarTrace (Magic) +# +#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> -VERSION = '3.0.5' +VERSION = '3.0.5.1' VERSION_BETA = '' #----------------------------------------- DOMAIN = 'icloud3' diff --git a/custom_components/icloud3/strings.json b/custom_components/icloud3/strings.json index 7fe4f17..3c5564b 100644 --- a/custom_components/icloud3/strings.json +++ b/custom_components/icloud3/strings.json @@ -60,16 +60,18 @@ "conf_updated": "iCloud3 Configuration Parameters were updated successfully", "conf_reloaded": "iCloud3 Configuration File was Reloaded", "icloud_acct_logging_into": "Logging into iCloud Account", - "icloud_acct_logged_into": "Successfully Logged into the iCloud Account", + "icloud_acct_logged_into": "Logged into the new iCloud Account. Select SAVE to save the changes and restart iCloud3", "icloud_acct_already_logged_into": "Already Logged into the iCloud Account", - "icloud_acct_login_error_user_pw": "Login Failed, Invalid Username or Password (err-400)", - "icloud_acct_login_error_other": "Login Failed, Other Error or iCloud is not Available", - "icloud_acct_login_error_connection": "Login Error, Failed to Connect to iCloud Server (err-302)", - "icloud_acct_not_available": "Login Error, iCloud Account is not Available", - "icloud_acct_not_logged_into": "iCloud Account is not Logged Into", + "icloud_acct_login_error_user_pw": "Login Error, Invalid Username or Password", + "icloud_acct_login_error_other": "Login Error, Other Error or iCloud is not Available", + "icloud_acct_login_error_connection": "Login Error, Failed to Connect to iCloud Server", + "icloud_acct_username_password_error": "Entry Error, Invalid Username or Password", + "icloud_acct_not_available": "Login Failed, iCloud Account is not Available", + "icloud_acct_not_logged_into": "Warning: iCloud Account is not Logged Into", + "icloud_acct_data_source_warning": "Warning: iCloud Account is not selected as a data source but username/password is setup", "icloud_acct_not_set_up": "iCloud Account Username or Password needs to be entered", "icloud_acct_no_data_source": "No Data Source (iCloud or Mobile App) has been selected", - "mobile_app_error": "The Mobile App Integration is not installed. The Mobile App will not be used as a data source; location data and zone enter/exit triggers will not be monitored", + "mobile_app_error": "Error, The Mobile App Integration is not installed. The Mobile App will not be used as a data source; location data and zone enter/exit triggers will not be monitored", "verification_code_requested": "The Apple ID Verification Code was requested, BROWSER REFRESH MAY BE NEEDED", "verification_code_requested2": "The Apple ID Verification Code was requested", @@ -221,7 +223,7 @@ "fname": "FRIENDLY NAME - Displayed in HA device_tracker and sensor names and on the Event Log", "device_type": "DEVICE TYPE - iPhone, iPad, Watch, etc.", "tracking_mode": "TRACKING MODE - How location requests should be done (Full tracking, Monitor, Inactive)", - "mobapp": "MOBILE APP INSTALLED - The HA Mobile App is installed on this device ", + "mobapp": "MOBILE APP INSTALLED - The HA Mobile App is installed on this device ", "action_items": "═════════════════════════════════════════════════════ ACTION COMMANDS" }, "data_description": { @@ -278,10 +280,10 @@ "title": "Display Location Time Zone when Away", "description": "The time displayed in the Event Log and Sensors show the time an event took place using the Home 'time zone' from your Home Assistant computer. When you are away from Home and in another time zone, your tracking events are still based on the time at your Home 'time zone', not time in your current location.\n\nThis screen lets you display time events using your current location's time zone.", "data": { - "away_time_zone_1_devices": "Devices that will display time events based on this location time", - "away_time_zone_1_offset": "Current Location Time", - "away_time_zone_2_devices": "Devices that will display time events based on this location time", - "away_time_zone_2_offset": "Current Location Time", + "away_time_zone_1_devices": "Devices in Away Time Zone #1", + "away_time_zone_1_offset": "Time & Time Zone Adjustment at Current Location #1", + "away_time_zone_2_devices": "Devices in Away Time Zone #2", + "away_time_zone_2_offset": "Time & Time Zone Adjustment at Current Location #2", "action_items": "═════════════════════════════════════════════════════ ACTION COMMANDS" }, "data_description": { @@ -294,6 +296,7 @@ "description": "Tracking activity, results and information messages are displayed in the Event log, sensors and device_tracker entities for tracked and monitored devices.\n\nThis screen us used to specify how these results should be displayed.", "data": { "log_level": "LOG LEVEL - The type of messages that are added to the HA log file by iCloud3", + "log_level_devices": "LOG LEVEL RAWDATA DEVICES FILTER - Dump rawdata for only these devices to log file", "display_zone_format": "EVENT LOG ZONE DISPLAY NAME - How the Zone name is displayed in sensors and the Event Log", "device_tracker_state_source": "DEVICE TRACKER STATE VALUE - How the device's device_tracker entity state value is determined", "time_format": "TIME FORMAT - How time fields are displayed in sensors and in the Event Log", @@ -341,7 +344,7 @@ "ipad": "IPAD", "watch": "APPLE WATCH", "airpods": "AIRPODS", - "no_mobapp": "MOBILE APP IS NOT INSTALLED ", + "no_mobapp": "MOBILE APP IS NOT INSTALLED", "other": "OTHER DEVICE TYPE", "distance_between_devices": "Determine the distance between devices. Use a near by device's tracking results", "action_items": "═════════════════════════════════════════════════════ ACTION COMMANDS" @@ -376,10 +379,10 @@ "data": { "stat_zone_header": "═════════════════════════════════════════════════════ STATIONARY ZONE", "stat_zone_fname": "FRIENDLY NAME BASE - Name to display when in a Stationary Zone (StatZone)", - "stat_zone_still_time": "NO MOVEMENT TIME ", - "stat_zone_inzone_interval": "INZONE INTERVAL ", + "stat_zone_still_time": "NO MOVEMENT TIME", + "stat_zone_inzone_interval": "INZONE INTERVAL", "passthru_zone_header": "═════════════════════════════════════════════════════ ENTER ZONE DELAY", - "passthru_zone_time": "ENTER ZONE DELAY TIME ", + "passthru_zone_time": "ENTER ZONE DELAY TIME", "track_from_base_zone_used": "═════════════════════════════════════════════════════ PRIMARY TRACK-FROM-HOME ZONE OVERRIDE", "track_from_base_zone": "TRACK FROM ZONE - Use this zone instead of Home for tracking results for all devices. Global setting", "track_from_home_zone": "TRACK FROM HOME ZONE - Keep tracking from the Home zone when the Primary Track From Zone is not Home", diff --git a/custom_components/icloud3/support/start_ic3.py b/custom_components/icloud3/support/start_ic3.py index a1cc756..2a07531 100644 --- a/custom_components/icloud3/support/start_ic3.py +++ b/custom_components/icloud3/support/start_ic3.py @@ -139,9 +139,8 @@ def process_config_flow_parameter_updates(): config_flow_updated_parms = Gb.config_flow_updated_parms Gb.config_flow_updated_parms = {''} - event_msg =(f"Configuration Loading > " + post_event( f"Configuration Loading > " f"Type-{list_to_str(config_flow_updated_parms).title()}") - post_event(event_msg) if 'restart' in config_flow_updated_parms: initialize_icloud_data_source() @@ -607,9 +606,8 @@ def check_mobile_app_integration(ha_started_check=None): if Gb.mobile_app_device_fnames: ha_started_check = True - event_msg =(f"Checking Mobile App Integration > Loaded, " + post_event( f"Checking Mobile App Integration > Loaded, " f"Devices-{list_to_str(Gb.mobile_app_device_fnames)}") - post_event(event_msg) Gb.debug_log['Gb.mobile_app_device_fnames'] = Gb.mobile_app_device_fnames Gb.debug_log['Gb.mobapp_fnames_x_mobapp_id'] = Gb.mobapp_fnames_x_mobapp_id @@ -622,9 +620,8 @@ def check_mobile_app_integration(ha_started_check=None): # not loaded, it is not available and the Mobile App data source is not available. # Display an error message since there are devices that use the Mobile App. if ha_started_check is None: - event_msg =(f"Checking Mobile App Integration > Not Loaded. " + post_event( f"Checking Mobile App Integration > Not Loaded. " f"Will check again when HA is started") - post_event(event_msg) return # Mobile App Integration not loaded @@ -637,7 +634,9 @@ def check_mobile_app_integration(ha_started_check=None): if conf_device[CONF_MOBILE_APP_DEVICE] == 'None': continue Device = Gb.Devices_by_devicename[conf_device[CONF_IC3_DEVICENAME]] - if Device.conf_mobapp_fname not in Gb.mobile_app_device_fnames: + if Device.conf_mobapp_fname in Gb.mobile_app_device_fnames: + Device.mobapp_monitor_flag = True + else: Device.mobapp_monitor_flag = False mobile_app_error_msg +=(f"{CRLF_DOT}{conf_device[CONF_MOBILE_APP_DEVICE]}" f"{RARROW}Assigned to {Device.fname_devicename}") @@ -861,11 +860,10 @@ def check_ic3_event_log_file_version(): if ic3_version_text == 'Not Installed': Gb.version_evlog = f' Not Found: {ic3_evlog_js_filename_msg}' - event_msg =(f"iCloud3 Event Log > " + post_event( f"iCloud3 Event Log > " f"{CRLF_DOT}Current Version Installed-v{www_version_text}" f"{CRLF_DOT}WARNING: SOURCE FILE NOT FOUND" f"{CRLF_DOT}...{ic3_evlog_js_filename_msg}") - post_event(event_msg) else: Gb.version_evlog = ic3_version_text @@ -892,10 +890,9 @@ def check_ic3_event_log_file_version(): current_version_installed_flag = False if current_version_installed_flag: - event_msg =(f"iCloud3 Event Log > " + post_event( f"iCloud3 Event Log > " f"{CRLF_DOT}Current Version Installed-v{www_version_text}" f"{CRLF_DOT}File-{format_filename(www_evlog_js_filename_msg)}") - post_event(event_msg) if Gb.evlog_version != www_version_text: Gb.evlog_version = Gb.conf_profile['event_log_version'] = www_version_text @@ -911,7 +908,7 @@ def check_ic3_event_log_file_version(): config_file.write_storage_icloud3_configuration_file() post_startup_alert('Event Log was updated. Browser refresh needed') - event_msg =(f"{EVLOG_ALERT}" + post_event( f"{EVLOG_ALERT}" f"BROWSER REFRESH NEEDED > iCloud3 Event Log was updated to v{ic3_version_text}" f"{more_info('refresh_browser')}" f"{CRLF}{'-'*75}" @@ -919,7 +916,6 @@ def check_ic3_event_log_file_version(): f"{CRLF_DOT}New Version - v{ic3_version_text}" f"{CRLF_DOT}Copied From - {format_filename(ic3_evlog_js_directory_msg)}/" f"{CRLF_DOT}Copied To.... - {format_filename(www_evlog_js_directory_msg)}/") - post_event(event_msg) Gb.info_notification = (f"Event Log Card updated to v{ic3_version_text}. " "See Event Log for more info.") @@ -1115,9 +1111,8 @@ def create_Zones_object(): post_event(f"{log_msg}{zone_msg}") if Gb.is_track_from_base_zone_used and Gb.track_from_base_zone != HOME: - event_msg = ( f"Primary 'Home' Zone > {zone_dname(Gb.track_from_base_zone)} " - f"{circle_letter(Gb.track_from_base_zone)}") - post_event(event_msg) + post_event( f"Primary 'Home' Zone > {zone_dname(Gb.track_from_base_zone)} " + f"{circle_letter(Gb.track_from_base_zone)}") event_msg = "Special Zone Setup >" if Gb.is_passthru_zone_used: @@ -1134,7 +1129,6 @@ def create_Zones_object(): f"MinDistFromAnotherZone-{format_dist_km(Gb.statzone_min_dist_from_zone_km)}") else: event_msg += f"{CRLF_DOT}STATIONARY ZONES ARE NOT USED" - post_event(event_msg) # Cycle thru the Device's conf and get all zones that are tracked from for all devices @@ -1231,21 +1225,19 @@ def create_Devices_object(): devicename = conf_device[CONF_IC3_DEVICENAME] if devicename == '': post_startup_alert(f"HA device_tracker entity id not configured for {conf_device[CONF_FAMSHR_DEVICENAME]}") - alert_msg =(f"{EVLOG_ALERT}CONFIGURATION ALERT > The device_tracker entity id (devicename) " + post_event( f"{EVLOG_ALERT}CONFIGURATION ALERT > The device_tracker entity id (devicename) " f"has not been configured for {conf_device[CONF_FAMSHR_DEVICENAME]}/" f"{conf_device[CONF_DEVICE_TYPE]}") - post_event(alert_msg) continue Gb.conf_famshr_devicenames.append(conf_device[CONF_FAMSHR_DEVICENAME]) broadcast_info_msg(f"Set up Device > {devicename}") if conf_device[CONF_TRACKING_MODE] == INACTIVE_DEVICE: - event_msg = (f"{CIRCLE_STAR}{devicename} > {conf_device[CONF_FNAME]}/{conf_device[CONF_DEVICE_TYPE]}, INACTIVE, " + post_event( f"{CIRCLE_STAR}{devicename} > {conf_device[CONF_FNAME]}/{conf_device[CONF_DEVICE_TYPE]}, INACTIVE, " f"{CRLF_SP3_DOT}FamShr Device-{conf_device[CONF_FAMSHR_DEVICENAME]}" # f"{CRLF_SP3_DOT}FmF Device-{conf_device[CONF_FMF_EMAIL]}" f"{CRLF_SP3_DOT}MobApp Entity-{conf_device[CONF_MOBILE_APP_DEVICE]}") - post_event(event_msg) continue # This list is based on the configuration, it will be rebuilt when the devices are verified @@ -1391,8 +1383,7 @@ def setup_tracked_devices_for_famshr(PyiCloud=None): _FamShr = PyiCloud.FamilySharing if Gb.conf_data_source_FAMSHR is False: - event_msg = "Family Sharing Devices > Not used as a data source" - post_event(event_msg) + post_event("Family Sharing Devices > Not used as a data source") return if Gb.conf_famshr_device_cnt == 0: @@ -1426,11 +1417,10 @@ def _check_renamed_famshr_devices(_FamShr): renamed_devices_str = list_to_str(renamed_devices, CRLF_DOT) - log_msg = ( f"{EVLOG_ALERT}FAMSHR DEVICE NAME CHANGED > The FamShr device name returned " + post_event( f"{EVLOG_ALERT}FAMSHR DEVICE NAME CHANGED > The FamShr device name returned " f"from your Apple iCloud account Family Sharing List has a new name. " f"The iCloud3 configuration file will be updated." f"{renamed_devices_str}") - post_event(log_msg) try: # Update the iCloud3 configuration file with the new FamShr devicename @@ -1482,12 +1472,11 @@ def _check_conf_famshr_devices_not_set_up(_FamShr): f"{devices_not_set_up_str.replace(CRLF_X, CRLF_DOT)}") if _FamShr.devices_cnt == -1: - log_msg = ( f"{EVLOG_ALERT}FAMSHR DEVICES ERROR > Your Apple iCloud Account Family Sharing List did " + post_event( f"{EVLOG_ALERT}FAMSHR DEVICES ERROR > Your Apple iCloud Account Family Sharing List did " f"not return any information for some of configured devices. FamShr will not be used " f"to track these devices." f"{devices_not_set_up_str}" f"{more_info('famshr_device_not_available')}") - post_event(log_msg) log_error_msg(f"iCloud3 Error > Some FamShr Devices were not Initialized > " f"{devices_not_set_up_str.replace(CRLF, ', ')}. " @@ -1748,10 +1737,9 @@ def _check_duplicate_device_names(PyiCloud, _FamShr): Device.set_fname_alert(YELLOW_ALERT) except Exception as err: - event_msg =( f"Error resolving similar device names, " + post_event( f"Error resolving similar device names, " f"{famshr_fname_base}/{famshr_fname_last_located}, " f"{err}") - post_event(event_msg) # Print dups msg with info and update config file if update_conf_file_flag: @@ -1798,6 +1786,7 @@ def setup_tracked_devices_for_fmf(PyiCloud=None): return broadcast_info_msg(f"Stage 3 > Set up Find-my-Friends Devices") + _trace(f"Stage 3 > Set up Find-my-Friends Devices") # devices_desc = get_fmf_devices(PyiCloud) # device_id_by_fmf_email = devices_desc[0] @@ -1810,22 +1799,28 @@ def setup_tracked_devices_for_fmf(PyiCloud=None): return PyiCloud = Gb.PyiCloud + _trace(f"{PyiCloud.FindMyFriends=}") + PyiCloud.create_FindMyFriends_object() _FmF = PyiCloud.FindMyFriends + # _Fmf._set_service_available(True) + Gb.conf_data_source_FMF = True + _FmF.refresh_client() + _trace(f"{PyiCloud.FindMyFriends=}") event_msg = "Find-My-Friends Devices > " - if Gb.conf_data_source_FMF is False: - event_msg += "Not used as a data source" - post_event(event_msg) - return - event_msg += f"{Gb.conf_fmf_device_cnt} of {len(Gb.conf_devices)} iCloud3 Devices Configured" - post_event(event_msg) - if Gb.conf_fmf_device_cnt == 0: - return - - elif _FmF is None or _FmF.device_id_by_fmf_email == {}: - event_msg += "NO DEVICES FOUND" - post_event(f"{EVLOG_ALERT}{event_msg}") - return + # if Gb.conf_data_source_FMF is False: + # event_msg += "Not used as a data source" + # post_event(event_msg) + # return + # event_msg += f"{Gb.conf_fmf_device_cnt} of {len(Gb.conf_devices)} iCloud3 Devices Configured" + # post_event(event_msg) + # if Gb.conf_fmf_device_cnt == 0: + # return + + # elif _FmF is None or _FmF.device_id_by_fmf_email == {}: + # event_msg += "NO DEVICES FOUND" + # post_event(f"{EVLOG_ALERT}{event_msg}") + # return try: Gb.fmf_device_verified_cnt = 0 @@ -2311,7 +2306,7 @@ def _search_for_mobapp_device(devicename, Device, mobapp_id_by_mobapp_devicename post_startup_alert( f"Mobile App device_tracker entity scan found several devices: " f"{Device.fname_devicename}") - alert_msg =(f"{EVLOG_ALERT}DUPLICATE MOBAPP DEVICES FOUND > More than one Device Tracker Entity " + post_event( f"{EVLOG_ALERT}DUPLICATE MOBAPP DEVICES FOUND > More than one Device Tracker Entity " f"was found during the scan of the HA Device Registry." f"{CRLF_X}AssignedTo-{Device.fname_devicename}" f"{CRLF}{more_info('mobapp_error_multiple_devices_on_scan')}" @@ -2319,7 +2314,6 @@ def _search_for_mobapp_device(devicename, Device, mobapp_id_by_mobapp_devicename f"{CRLF}Count-{len(matched_mobapp_devices)}, " f"{CRLF}Entities-{', '.join(matched_mobapp_devices)}, " f"{CRLF}Monitored-{mobapp_devicename}") - post_event(alert_msg) log_error_msg(f"iCloud3 Error > Mobile App Config Error > Dev Trkr Entity not found " f"during Search {conf_mobapp_device}_???. " @@ -2338,14 +2332,13 @@ def _display_any_mobapp_errors( mobapp_error_mobile_app_msg, post_startup_alert( f"Mobile App Integration missing trigger or battery sensors" f"{mobapp_error_mobile_app_msg.replace(CRLF_X, CRLF_DOT)}") - alert_msg =(f"{EVLOG_ALERT}MOBILE APP INTEGRATION (Mobile App) SET UP PROBLEM > The Mobile App " + post_event( f"{EVLOG_ALERT}MOBILE APP INTEGRATION (Mobile App) SET UP PROBLEM > The Mobile App " f"Integration `last_update_trigger` and `battery_level` sensors are disabled or " f"were not found during the scan of the HA Entities Registry for a Device." f"iCloud3 will use the Mobile App for Zone (State) changes but update triggers and/or " f"battery information will not be available for these devices." f"{mobapp_error_mobile_app_msg}" f"{more_info('mobapp_error_mobile_app_msg')}") - post_event(alert_msg) log_error_msg(f"iCloud3 Error > The Mobile App Integration has not been set up or the " f"battery_level or last_update_trigger sensor entities were not found." @@ -2355,11 +2348,10 @@ def _display_any_mobapp_errors( mobapp_error_mobile_app_msg, post_startup_alert( f"Mobile App Config Error > Device Tracker Entity not found" f"{mobapp_error_search_msg.replace(CRLF_X, CRLF_DOT)}") - alert_msg =(f"{EVLOG_ALERT}MOBAPP DEVICE NOT FOUND > An MobApp device_tracker " + post_event( f"{EVLOG_ALERT}MOBAPP DEVICE NOT FOUND > An MobApp device_tracker " f"entity was not found in the `Scan for mobile_app devices` in the HA Device Registry." f"{mobapp_error_search_msg}" f"{more_info('mobapp_error_search_msg')}") - post_event(alert_msg) log_error_msg(f"iCloud3 Error > Mobile App Device Tracker Entity not found " f"in the HA Devices List." @@ -2370,11 +2362,10 @@ def _display_any_mobapp_errors( mobapp_error_mobile_app_msg, post_startup_alert( f"Mobile App Config Error > Device Tracker Entity not found" f"{mobapp_error_not_found_msg.replace(CRLF_X, CRLF_DOT)}") - alert_msg =(f"{EVLOG_ALERT}MOBAPP DEVICE NOT FOUND > The device tracker entity " + post_event( f"{EVLOG_ALERT}MOBAPP DEVICE NOT FOUND > The device tracker entity " f"was not found during the scan of the HA Device Registry." f"{mobapp_error_not_found_msg}" f"{more_info('mobapp_error_not_found_msg')}") - post_event(alert_msg) log_error_msg(f"iCloud3 Error > Mobile App Device Tracker Entity was not found " f"in the HA Devices List." @@ -2385,12 +2376,11 @@ def _display_any_mobapp_errors( mobapp_error_mobile_app_msg, post_startup_alert( f"Mobile App Config Error > Device Tracker Entity disabled" f"{mobapp_error_disabled_msg.replace(CRLF_X, CRLF_DOT)}") - alert_msg =(f"{EVLOG_ALERT}MOBILE APP DEVICE DISABLED > The device tracker entity " + post_event( f"{EVLOG_ALERT}MOBILE APP DEVICE DISABLED > The device tracker entity " f"is disabled so the mobile_app last_update_trigger and bettery_level sensors " f"can not be monitored. iCloud3 will not use the Mobile App for these devices." f"{mobapp_error_disabled_msg}" f"{more_info('mobapp_error_disabled_msg')}") - post_event(alert_msg) log_error_msg(f"iCloud3 Error > Mobile App Device Tracker Entity is disabled and " f"can not be monitored by iCloud3." @@ -2420,6 +2410,7 @@ def setup_notify_service_name_for_mobapp_devices(post_event_msg=False): mobapp_devicename = mobile_app_notify_devicename.replace('mobile_app_', '') for devicename, Device in Gb.Devices_by_devicename.items(): if instr(mobapp_devicename, devicename) or instr(devicename, mobapp_devicename): + Device.mobapp_monitor_flag = True if Device.mobapp[NOTIFY] == '': Device.mobapp[NOTIFY] = mobile_app_notify_devicename setup_msg += (f"{CRLF_DOT}{Device.devicename_fname}{RARROW}{mobile_app_notify_devicename}") @@ -2672,9 +2663,8 @@ def display_inactive_devices(): if len(inactive_devices) == len(Gb.conf_devices): post_startup_alert('All devices are Inactive and nothing will be tracked') - event_msg =(f"{EVLOG_ALERT}ALL DEVICES ARE INACTIVE > " + post_event( f"{EVLOG_ALERT}ALL DEVICES ARE INACTIVE > " f"{more_info('all_devices_inactive')}") - post_event(event_msg) #------------------------------------------------------------------------------ def display_object_lists(): @@ -2716,7 +2706,6 @@ def post_restart_icloud3_complete_msg(): for devicename, Device in Gb.Devices_by_devicename.items(): # Device.display_info_msg("Setup Complete, Locating Device") - event_msg =(f"{EVLOG_IC3_STARTING}Initializing iCloud3 v{Gb.version} > Complete") - post_event(event_msg) + post_event(f"{EVLOG_IC3_STARTING}Initializing iCloud3 v{Gb.version} > Complete") Gb.EvLog.update_event_log_display("") \ No newline at end of file diff --git a/custom_components/icloud3/translations/zh-Hans.json b/custom_components/icloud3/translations/zh-Hans.json new file mode 100644 index 0000000..8fd6e8a --- /dev/null +++ b/custom_components/icloud3/translations/zh-Hans.json @@ -0,0 +1,508 @@ +{ + "title": "iCloud3 v3:iDevice 跟踪器", + "config": { + "abort": { + "config_update_complete": "iCloud3 配置更新成功", + "already_configured": "iCloud3 已经安装,无法再次安装。请在 iCloud3 集成条目中选择 CONFIGURE 来配置 iCloud3。\n\n如果您正在删除然后重新安装,请先重启 HA 然后再重新安装 iCloud3", + "disabled": "iCloud3 已禁用,不能再次安装。启用 iCloud3,然后在 iCloud3 集成条目中选择 CONFIGURE 来配置 iCloud3。\n\n如果您正在删除然后重新安装,请先重启 HA 然后再重新安装 iCloud3", + "login_error": "登录 iCloud 账户时发生错误。请验证用户名和密码。", + "reauth_successful": "重新认证成功完成", + "verification_code_accepted": "苹果 ID 验证码已接受。重新认证完成", + "verification_code_cancelled": "苹果 ID 验证已取消", + "update_cancelled": "更新已取消", + "icloud3_init_error": "初始化 iCloud3 配置设置屏幕时遇到问题。iCloud3 可能在初始化期间遇到错误并未启动。检查 'home-assistant.log' 文件以获取与 iCloud3 相关的任何错误" + }, + "error": { + "invalid_path": "提供的路径无效。应为 'user/repo-name' 格式", + "verification_code_send_error": "发送苹果 ID 验证码失败", + "verification_code_requested2": "已请求苹果 ID 验证码", + "verification_code_invalid": "验证码不正确。请重新输入或请求新的验证码", + "icloud_no_devices": "在 iCloud '家庭共享' 列表中未找到设备", + "icloud_other_error": "认证 iCloud 账户时遇到未知错误。请稍后再试" + }, + "step": { + "user": { + "data": { + "continue": "选择继续 iCloud3 安装(及参数迁移)", + "continue_restart_ha": "选择继续 iCloud3 安装。然后重启家庭助理。" + }, + "description": "恭喜!iCloud3 v3 集成已添加到家庭助理。下一步是配置您想要跟踪的设备。如果您正在运行 iCloud3 v2,您的配置将从 v2 迁移到 v3。\n\n选择下面的提交按钮,然后选择 CONFIGURE 来配置 iCloud3。\n\niCloud3 用户指南将帮助您开始:\n• ICLOUD3 文档 - 在此屏幕右上角选择问号 (?) 打开 'iCloud 用户指南'\n• 从 v2 迁移 - 按照 '安装 iCloud3 > 从 v2 到 v3 的迁移' 章节中的步骤\n• 新安装 - 按照 '安装 iCloud3 > 作为新安装' 章节中的步骤", + "title": "iCloud3 v3 集成安装程序" + }, + "reauth": { + "title": "苹果 ID 验证码(家庭助理通知)", + "description": "输入您刚从苹果收到的六位数验证码", + "data": { + "verification_code": "ICLOUD 账户验证代码", + "action_items": "═════════════════════════════════════════════════════" + } + }, + "restart_ha": { + "title": "确认重新启动家庭助理", + "description": "iCloud3 需要重新启动家庭助理以防止 device_tracker 实体名称冲突", + "data": { + "action_items": "" + } + } + } + }, + "options": { + "abort": { + "config_update_complete": "iCloud3 配置更新成功", + "already_configured": "iCloud3 已经安装,不能再次安装。请在 iCloud3 集成条目中选择 CONFIGURE 来配置 iCloud3", + "disabled": "iCloud3 已禁用,不能再次安装。启用 iCloud,然后在 iCloud3 集成条目中选择 CONFIGURE 来配置 iCloud3", + "ha_restarting": "家庭助理正在重新启动\n\n重新启动后必须刷新 iCloud3 屏幕", + "ic3_reloading": "正在重新加载 iCloud3\n\n重新启动后必须刷新 iCloud3 屏幕", + "reauth_successful": "重新认证成功完成" + }, + "error": { + "update_aborted": "更新中止,检测到一个数据字段中的错误", + "conf_updated": "iCloud3 配置参数已成功更新", + "conf_reloaded": "iCloud3 配置文件已重新加载", + "icloud_acct_logging_into": "正在登录 iCloud 账户", + "icloud_acct_logged_into": "已登录新的 iCloud 账户。选择 SAVE 以保存更改并重启 iCloud3", + "icloud_acct_already_logged_into": "已登录 iCloud 账户", + "icloud_acct_login_error_user_pw": "登录错误,用户名或密码无效", + "icloud_acct_login_error_other": "登录错误,其他错误或 iCloud 不可用", + "icloud_acct_login_error_connection": "登录错误,无法连接到 iCloud 服务器", + "icloud_acct_username_password_error": "输入错误,用户名或密码无效", + "icloud_acct_not_available": "登录失败,iCloud 账户不可用", + "icloud_acct_not_logged_into": "警告:iCloud 账户未登录", + "icloud_acct_data_source_warning": "警告:未选择 iCloud 账户作为数据来源,但已设置用户名/密码", + "icloud_acct_not_set_up": "需要输入 iCloud 账户用户名或密码", + "icloud_acct_no_data_source": "未选择数据来源(iCloud 或移动应用)", + "mobile_app_error": "错误,移动应用集成未安装。移动应用将不会被用作数据来源;位置数据和区域进出触发器将不会被监控", + "verification_code_requested": "已请求苹果 ID 验证码,可能需要刷新浏览器", + "verification_code_requested2": "已请求苹果 ID 验证码", + "verification_code_needed": "需要苹果 ID 验证码", + "verification_code_accepted": "苹果 ID 验证码已接受", + "verification_code_invalid": "验证码不正确。请重新输入或请求新的验证码", + "verification_code_send_error": "发送苹果 ID 验证码失败", + + "inactive_device": "设备处于非活动状态。更改为 'Track' 以定位和跟踪此设备", + "inactive_all_devices": "✪✪ 所有设备均处于非活动状态。将不进行跟踪 ✪✪", + "inactive_most_devices": "大多数设备处于非活动状态,将不会被定位或跟踪", + "inactive_some_devices": "一些设备处于非活动状态,将不会被定位或跟踪", + "inactive_few_devices": "少数设备处于非活动状态,将不会被定位或跟踪", + "inactive_no_devices": "未设置设备。选择 'Add Device' 并提交", + + "away_time_zone_dup_devices_1": "这些设备中的一个也在其他设备列表中选择", + "away_time_zone_dup_devices_2": "这些设备中的一个也在其他设备列表中选择", + + "review_filledin_fields": "复查已填写的字段", + "not_numeric": "输入的值不是数字", + "waze_server_error_us": "您所在地的正确服务器是:美国,加拿大", + "waze_server_error_il": "您所在地的正确服务器是:以色列", + "waze_server_error_row": "您所在地的正确服务器是:世界其他地区", + "required_field": "必须指定此参数", + "required_field_device": "必须从家庭共享、查找我的朋友或移动应用设备列表中选择提供位置数据的设备", + "no_device_selected": "必须选择提供位置数据的设备", + "no_add_entities_device_tracker_fct": "添加设备的 HA 组件不可用。必须重启 HA", + "unknown_devicename": "先前选择的设备无法识别。它的名称可能已更改或已被删除。重新选择要跟踪或监控的设备", + "unknown_value": "iCloud3 配置文件中此参数的值未知或无效。必须重新选择", + "unknown_famshr": "当 iCloud3 启动时,未从 iCloud 返回 FamShr 设备。检查 FindMy 设备列表和家庭共享列表。查看启动阶段 4 的事件日志以获取更多信息以及从 iCloud 账户返回的设备列表", + "unknown_fmf": "当 iCloud3 启动时,未从 iCloud 返回 FmF 设备。检查 FindMy 应用设备共享位置信息。查看启动阶段 4 的事件日志以获取更多信息以及从 iCloud 账户返回的设备列表", + "unknown_mobapp": "在 HA 设备注册扫描期间未找到 mobile_app device_tracker 实体。检查 HA 设置 > 设备和服务 > 设备中的移动应用设备列表。查看启动阶段 4 的事件日志以获取更多信息以及在 HA 设备注册中找到的 mobile_app 设备列表", + "unknown_picture": "未在 HA config/www 目录中找到图片文件名。重新选择文件名或检查是否已被删除", + + "unknown_famshr_fmf": "检查 FamShr 和 FmF 参数值(未找到或无效)", + "unknown_famshr_fmf_mobapp": "检查 FamShr、FmF 和移动应用参数值(未找到或无效)", + "unknown_famshr_fmf_mobapp_picture": "检查 FamShr、FmF、移动应用和图片参数值(未找到或无效)", + "unknown_famshr_mobapp": "检查 FamShr 和移动应用参数值(未找到或无效)", + "unknown_famshr_mobapp_picture": "检查 FamShr、移动应用和图片参数值(未找到或无效)", + "unknown_famshr_picture": "检查 FamShr 和图片参数值(未找到或无效)", + "unknown_fmf_mobapp": "检查 FmF 和移动应用参数值(未找到或无效)", + "unknown_fmf_mobapp_picture": "检查 FmF、移动应用和图片参数值(未找到或无效)", + "unknown_fmf_picture": "检查 FmF 和图片参数值(未找到或无效)", + "unknown_mobapp_picture": "检查移动应用和图片参数值(未找到或无效)", + + "tfz_selection_invalid": "该值必须是被跟踪的区域", + "time_factor_invalid_range": "'旅行时间乘数' 必须在 .1 到 .9 之间", + "fixed_interval_invalid_range": "'固定间隔' 必须为 0 (未使用) 或 >= 3 (推荐 > 5)", + "display_text_as_no_gtsign": "实际文本和显示文本之间缺少 '>'", + "display_text_as_no_actual": "未指定 '实际文本'", + "display_text_as_no_display_as": "未指定 '显示文本'", + "not_found_directory": "未找到目录", + "not_found_file": "未找到文件", + "duplicate_ic3_devicename": "此名称已被另一台 iCloud3 设备使用", + "already_assigned": "此选择已分配给另一台设备", + "mobapp_search_error": "警告:搜索失败 - 未找到以 iCloud3 或 FamShr 设备名开头的移动应用设备。选择 '无' 或要使用的设备。", + "duplicate_other_devicename": "此名称已在另一集成或平台中使用", + "action_completed": "请求的操作已完成", + "action_cancelled": "请求的操作已取消", + "restart_ha": "需要重启家庭助理以继续", + "excluded_sensors_ha_restart": "已更新排除的传感器。需要重启 HA" + }, + "step": { + "menu": { + "title": "iCloud3 配置设置", + "data": { + "menu_items": "", + "action_items": "═════════════════════════════════════════════════════" + } + }, + "menu_0": { + "title": "配置设备和传感器菜单", + "data": { + "menu_items": "", + "action_items": "═════════════════════════════════════════════════════" + } + }, + "menu_1": { + "title": "配置参数菜单", + "data": { + "menu_items": "", + "action_items": "═════════════════════════════════════════════════════" + } + }, + "restart_icloud3": { + "title": "确认重新启动 iCloud3", + "description": "注意:跟踪设备的变更需要重新启动 iCloud3", + "data": { + "action_items": "═════════════════════════════════════════════════════" + } + }, + "restart_ha_ic3": { + "title": "重新启动家庭助理或 iCloud3", + "description": "重新启动家庭助理或重新加载并重新初始化 iCloud3 集成\n\n重新启动后必须刷新 iCloud3 仪表板屏幕", + "data": { + "action_items": "═════════════════════════════════════════════════════" + } + }, + "restart_ha_ic3_load_error": { + "title": "iCloud3 加载错误", + "description": "当 HA 启动时,iCloud3 未加载和初始化。再次重新加载 iCloud3 或重新启动 HA", + "data": { + "action_items": "═════════════════════════════════════════════════════" + } + }, + "confirm_action": { + "title": "确认所选操作", + "data": { + "action_items": "═════════════════════════════════════════════════════" + } + }, + "icloud_account": { + "title": "iCloud 账户和移动应用数据源", + "description": "数据源提供 iCloud3 用于跟踪 iDevice 的位置和其他信息。\n\n它们包括:\n• ICLOUD 账户 - 苹果 iCloud Web 服务为家庭共享列表中的设备提供位置和其他信息。\n• 移动应用 - 安装在 iPhone 和 iPad 上的 HA 伴侣应用提供区域进入/退出触发器和位置信息。使用此数据服务需要安装移动应用集成。\n\n家庭共享列表和移动应用中的设备被分配给 iCloud3 在更新设备屏幕上跟踪的每个设备。", + "data": { + "data_source_icloud": "═════════════════════════════════════════════════════ ICLOUD 账户 - 位置数据由苹果 iCloud 账户提供", + "username": "APPLE ID (用户名) - 用于登录 iCloud 账户的电子邮件地址", + "password": "密码 - iCloud 账户密码", + "url_suffix_china": "中国用户 - 使用位于中国的苹果 iCloud Web 服务器 (.cn URL 后缀)", + "data_source_mobapp": "═════════════════════════════════════════════════════ 移动应用 - 位置数据由 HA 移动应用提供", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": {} + }, + "reauth": { + "title": "苹果 ID 验证码", + "description": "输入您刚从苹果收到的六位数验证码", + "data": { + "verification_code": "ICLOUD 账户验证代码", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + } + }, + "device_list": { + "title": "iCloud3 设备", + "description": "iCloud3 可跟踪或监控最多 10 个设备。它们在此列出。\n\n此屏幕用于选择需要更新的设备,添加新设备并删除不再跟踪的设备。", + "data": { + "xdevices": "═════════════════════════════════════════════════════ ICLOUD3 设备", + "devices": "═════════════════════════════════════════════════════", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + } + }, + "add_device": { + "title": "添加 iCloud3 设备", + "data": { + "ic3_devicename": "ICLOUD3 DEVICE_TRACKER ENTITY ID - 分配给此设备的 HA device_tracker 实体", + "fname": "友好名称 - 显示在 HA device_tracker 和传感器名称以及事件日志中", + "device_type": "设备类型 - iPhone,iPad,Watch 等", + "tracking_mode": "跟踪模式 - 应如何执行位置请求(完全跟踪,监控,非活动)", + "mobapp": "已安装移动应用 - 此设备上安装了 HA 移动应用", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": {} + }, + "update_device": { + "title": "更新 iCloud3 设备", + "description": "此屏幕允许您配置可以使用 iCloud3 跟踪或监控的每个设备", + "data": { + "ic3_devicename": "ICLOUD3 DEVICE_TRACKER ENTITY ID - 分配给此设备的 HA device_tracker 实体", + "fname": "友好名称 - 显示在 HA device_tracker 和传感器名称以及事件日志中", + "device_type": "设备类型 - iPhone,iPad,Watch 等", + "tracking_mode": "跟踪模式 - 应如何执行位置请求(完全跟踪,监控,非活动)", + "famshr_devicename": "家庭共享列表设备 - 使用此 iCloud 账户家庭共享成员的位置数据", + "fmf_email": "查找我的朋友设备 - 使用与您共享其信息的 FindMy 设备的位置数据", + "mobile_app_device": "移动应用 DEVICE_TRACKER ENTITY - 使用此 HA 设备的位置数据和区域进入/退出触发器", + "log_zones": "记录区域活动 - 保存进入/退出区域信息(日期,时间,距离)到电子表格 .csv 文件", + "track_from_zones": "从区域跟踪 - 从家和其他区域跟踪旅行时间和距离", + "track_from_base_zone": "主要从家区域跟踪覆盖 - 使用此区域而不是家作为跟踪结果", + "picture": "图片 - 通常使用此设备的人的照片图像(44x44 像素是一个好的尺寸)", + "inzone_interval": "区域内间隔", + "fixed_interval": "固定间隔", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": { + "inzone_interval": "区域内位置请求之间的时间", + "fixed_interval": "非区域内位置请求之间的固定时间。iCloud3 计算下一次定位请求的间隔并使用计算值(如果未设置 (= 0))。当计算间隔小于 5 分钟、当前位置数据过时、设备离线或设备不在区域内时,将不使用此值。", + "track_from_base_zone": "通常,家区域用作所有跟踪的主要跟踪区域(旅行时间,距离等)。然而,如果您长时间离家或设备通常在另一个位置(度假屋,第二家,父母家等),可以使用不同的区域作为主要跟踪区域。这可以在特殊区域屏幕上为所有设备全局设置。" + } + }, + "delete_device": { + "title": "删除 iCloud3 设备", + "data": { + "action_items": "═════════════════════════════════════════════════════ 删除选项" + } + }, + "review_inactive_devices": { + "title": "查看未跟踪(非活动)设备", + "description": "设备的 '跟踪模式' 设置为 '非活动',将不会被定位或跟踪。", + "data": { + "inactive_devices": "═════════════════════════════════════════════════════ INACTIVE ICLOUD3 设备", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + } + }, + "change_device_order": { + "title": "事件日志设备显示顺序", + "description": "设备在事件日志标题区域和各种事件日志消息中按以下顺序显示。\n\n此屏幕允许您更改设备的顺序。", + "data": { + "device_desc": "═════════════════════════════════════════════════════ ICLOUD3 设备", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + } + }, + "away_time_zone": { + "title": "外出时显示位置时区", + "description": "事件日志和传感器显示的时间显示事件发生时使用的家庭助理计算机的 '家庭时区' 时间。当您远离家并处于另一个时区时,您的跟踪事件仍然基于您的家庭 '时区' 时间,而不是您当前位置的时间。\n\n此屏幕允许您使用您当前位置的时区显示时间事件。", + "data": { + "away_time_zone_1_devices": "外出时区 #1 的设备", + "away_time_zone_1_offset": "当前位置 #1 的时间和时区调整", + "away_time_zone_2_devices": "外出时区 #2 的设备", + "away_time_zone_2_offset": "当前位置 #2 的时间和时区调整", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": { + "time_zone_1_offset": "主要设备和位置时间 - 外出并处于另一个时区时的设备和当前位置时间", + "time_zone_2_offset": "次要设备和位置时间 - 外出并处于另一个时区时的设备和当前位置时间" + } + }, + "format_settings": { + "title": "格式设置", + "description": "跟踪活动、结果和信息消息显示在事件日志、传感器和跟踪和监控设备的 device_tracker 实体中。\n\n此屏幕用于指定如何显示这些结果。", + "data": { + "log_level": "日志级别 - iCloud3 添加到 HA 日志文件的消息类型", + "log_level_devices": "日志级别 RAWDATA 设备过滤器 - 仅为这些设备将原始数据转储到日志文件", + "display_zone_format": "事件日志区域显示名称 - 传感器和事件日志中区域名称的显示方式", + "device_tracker_state_source": "设备跟踪器状态值 - 确定设备的 device_tracker 实体状态值的方式", + "time_format": "时间格式 - 传感器和事件日志中时间字段的显示方式", + "unit_of_measurement": "度量单位 - 传感器和事件日志中距离字段的显示方式", + "display_gps_lat_long2": "显示 GPS 坐标 - 在事件日志中显示 GPS(纬度、经度/±精度)或仅显示 GPS(/±精度)", + "display_gps_lat_long": "显示 GPS 坐标 - 在事件日志中显示 GPS-(22.32771, -76.33073/±35m) 而不是 GPS-/±35m", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": { + "device_tracker_state_source": "HA 使用设备的 GPS 坐标来确定区域。不考虑 GPS 精度,因此当 GPS 漫游到区域外时可能会退出区域。iCloud3 考虑 GPS 精度,在发生这种情况时不会退出区域。iCloud3 将显示区域的友好名称或在事件日志中显示的区域名称。" + } + }, + "display_text_as": { + "title": "事件日志 '显示文本为'", + "description": "事件日志屏幕上显示的某些文本字段,例如电子邮件地址或电话号码,是私人的,不应显示。例如,您可以将 'geekstergary@apple.com' 替换为 'gary@email.com'。\n\n此屏幕用于指定原始文本和应显示的文本。", + "data": { + "display_text_as": "═════════════════════════════════════════════════════ TEXT REPLACEMENT FIELDS - [Actual text > Displayed text]", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + } + }, + "display_text_as_update": { + "title": "更新事件日志 '显示文本为' 值", + "data": { + "text_from": "原始文本 - 要替换的文本 (例如: gary_real_email@gmail.com)", + "text_to": "显示文本- 要显示的文本 (显示: gary@email.com)", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": {} + }, + "actions": { + "title": "iCloud3 操作命令", + "data": { + "ic3_actions": "═════════════════════════════════════════════════════ ICLOUD3 GENERAL CONTROL ACTIONS", + "debug_actions": "═════════════════════════════════════════════════════ DEBUG LOG ACTIONS", + "other_actions": "═════════════════════════════════════════════════════ OTHER ACTIONS", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + } + }, + "inzone_intervals": { + "title": "inZone 参数和默认间隔", + "description": "inZone 间隔是设备在区域内时位置请求之间的时间。\n\n此屏幕用于为不同类型的设备设置默认值。添加设备时会将此值分配给设备。\n\n注意:在更新设备屏幕上,可以为每个设备设置不同的 inZone 间隔。", + "data": { + "iphone": "IPHONE & IPOD", + "ipad": "IPAD", + "watch": "APPLE WATCH", + "airpods": "AIRPODS", + "no_mobapp": "移动应用未安装", + "other": "其他设备类型", + "distance_between_devices": "确定设备之间的距离。使用附近设备的跟踪结果", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": { + "no_mobapp": "如果不使用移动应用进行位置监控和区域进入/退出触发器,则默认间隔", + "other": "未指定设备类型的 inzone 间隔" + } + }, + "waze_main": { + "title": "Waze - 路线服务旅行时间/距离", + "data": { + "waze_used": "═════════════════════════════════════════════════════ WAZE 路线服务", + "waze_region": "路线服务器位置 - 您所在地区的 Waze 路线服务器位置", + "waze_realtime": "使用实时数据 - Waze 在确定旅行时间时应考虑交通延迟", + "waze_min_distance": "WAZE 最小距离", + "waze_max_distance": "WAZE 最大距离", + "waze_history_database_used": "═════════════════════════════════════════════════════ WAZE 历史数据库", + "waze_history_track_direction": "一般旅行方向 - 用于在保存位置之间显示 '地图追踪线'", + "waze_history_max_distance": "历史最大距离", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": { + "waze_min_distance": "当区域距离大于此值时使用 Waze 路线服务", + "waze_max_distance": "当区域距离大于此值时不使用 Waze 路线服务", + "waze_history_max_distance": "如果距离大于此值,则不将 Waze 旅行时间和距离保存到 Waze 历史数据库" + } + }, + "special_zones": { + "title": "特殊区域", + "description": "此屏幕用于配置:\n• 静止区域 - 当设备在短时间内位于同一位置时创建\n• 进入区域延迟时间 - 延迟处理区域进入触发器\n• 在另一个位置的临时\"家\"区域", + "data": { + "stat_zone_header": "═════════════════════════════════════════════════════ 静止区域", + "stat_zone_fname": "友好名称基础 - 在静止区域时显示的名称 (StatZone)", + "stat_zone_still_time": "无移动时间", + "stat_zone_inzone_interval": "区域内间隔", + "passthru_zone_header": "═════════════════════════════════════════════════════ 进入区域延迟", + "passthru_zone_time": "进入区域延迟时间", + "track_from_base_zone_used": "═════════════════════════════════════════════════════ 主要从家区域跟踪覆盖", + "track_from_base_zone": "跟踪来源区域 - 使用此区域而不是家作为所有设备的跟踪结果。全局设置", + "track_from_home_zone": "从家区域跟踪 - 当主要跟踪来源区域不是家时,保持从家区域跟踪", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": { + "passthru_zone_time": "延迟处理您可能正在驾驶通过而实际上并未进入的进入区域触发器", + "stat_zone_still_time": "在同一位置停留一段时间后进入静止区域", + "stat_zone_inzone_interval": "在静止区域内位置请求之间的时间间隔", + "stat_zone_fname": "在设备处于静止区域时,在事件日志、device_tracker、旅行方向和区域实体中显示此值。iCloud3 为静止区域分配编号。使用通配符字符 '#' 在静止区域的名称中显示此值 (StatZon1, StatZon2, etc)。注意:7 个字母的名称留出空间以便在 iPhone 屏幕上显示名称和编号而不被截断。" + } + }, + "sensors": { + "title": "传感器", + "description": "许多传感器用于显示设备的跟踪结果和其他信息。\n\n此屏幕用于选择应创建的传感器。", + "data": { + "monitored_devices": "═════════════════════════════════════════════════════ MONITORED DEVICE SENSORS - 为受监控设备选择要创建的传感器类型", + "device": "═════════════════════════════════════════════════════ DEVICE SENSORS - 设备状态和信息", + "tracking_update": "═════════════════════════════════════════════════════ LOCATION UPDATE SENSORS - 设备位置更新时间", + "tracking_time": "═════════════════════════════════════════════════════ TIME SENSORS - 设备跟踪定时器", + "tracking_distance": "═════════════════════════════════════════════════════ DISTANCE SENSORS - 设备跟踪距离", + "track_from_zones": "═════════════════════════════════════════════════════ TRACK FROM MULTIPLE ZONE SENSORS - 当从多个区域跟踪时使用(仅从家区域跟踪时不需要)", + "tracking_other": "═════════════════════════════════════════════════════ OTHER TRACKING SENSORS - 通常不使用但可用", + "zone": "═════════════════════════════════════════════════════ ZONE SENSORS - 设备区域状态和信息", + "other": "═════════════════════════════════════════════════════ OTHER SENSORS - 不在上述区域中的传感器", + "excluded_sensors": "═════════════════════════════════════════════════════ EXCLUDED SENSORS - 当 iCloud3 启动时不会创建的传感器", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + } + }, + "exclude_sensors": { + "title": "排除传感器", + "description": "为设备创建了许多传感器,但有时您可能希望不为特定设备创建传感器。例如,您可能希望建立一个电池传感器,但除了一个设备外。\n\n此屏幕让您指定不应创建的传感器实体名称。", + "data": { + "excluded_sensors": "EXCLUDED SENSORS - 当 iCloud3 启动时不会创建的传感器", + "filter": "FILTER DISPLAYED SENSORS - 选择应显示的传感器", + "filtered_sensors": "ICLOUD3 SENSORS - 当 iCloud3 启动时创建的传感器列表", + "action_items": "═════════════════════════════════════════════════════ ACTION COMMANDS" + } + }, + "tracking_parameters": { + "title": "跟踪和其他参数", + "description": "一些参数不属于其他任何一般类别,很少更改。\n\n此屏幕用于指定这些参数。", + "data": { + "log_level": "LOG LEVEL - 在 iCloud3 操作期间添加到 HA 日志文件的消息类型", + "gps_accuracy_threshold": "GPS 精度阈值", + "old_location_threshold": "旧位置阈值", + "old_location_adjustment": "旧位置调整", + "distance_between_devices": "使用附近设备的位置结果", + "max_interval": "最大间隔", + "exit_zone_interval": "退出区域间隔", + "mobapp_alive_interval": "请求移动应用位置间隔", + "tfz_tracking_max_distance": "跟踪来源区域显示距离", + "offline_interval": "设备离线间隔", + "travel_time_factor": "旅行时间间隔和下一次位置更新乘数", + "discard_poor_gps_inzone": "丢弃区域内 GPS 精度差的结果 - 当在区域内时丢弃 GPS 精度差的位置更新", + "picture_www_dirs": "包含图片图像的 WWW 目录 - Update Devices > Pictures 文件位置的筛选器", + "event_log_card_directory": "EVENT LOG CARD LOVELACE RESOURCES DIRECTORY - 事件日志自定义卡片 .js 文件目录", + "event_log_btnconfig_url": "EVENT LOG CONFIGURE BUTTON (GEAR) URL > 显示 HA 配置设置屏幕的特殊 URL", + "action_items": "═════════════════════════════════════════════════════ 操作命令" + }, + "data_description": { + "old_location_threshold": "早于此值的位置将被丢弃", + "old_location_adjustment": "增加这个时间来决定位置是否旧", + "distance_between_devices": "当更新跟踪结果时,会识别出附近的设备。当更新这些设备的跟踪结果时,可以使用最初更新的跟踪结果代替。这样可以提高性能,因为不需要再次请求 Waze 路线时间和距离", + "gps_accuracy_threshold": "GPS 精度高于此值的位置将被丢弃", + "tfz_tracking_max_distance": "通常显示家区域的时间和距离数据在设备的 device_tracker 和传感器实体上。当设备在跟踪来源区域的此距离内时,显示跟踪来源区域而不是家区域", + "max_interval": "位置请求之间的最大时间", + "exit_zone_interval": "退出区域后的第一次位置请求时间", + "mobapp_alive_interval": "如果在此时间后没有联系,则向移动应用发送位置请求。这将检查移动应用是否响应位置请求或是否休眠且未运行。", + "offline_interval": "离线时的位置请求间隔(飞行模式,无手机区域等)", + "travel_time_factor": "这用于计算前往家的间隔和下一个位置时间。较小的值将减少间隔时间并增加位置请求,较大的值将增加间隔并减少位置请求。", + "event_log_btnconfig_url": "通常,这是空白的,iCloud3 将确定其配置设置屏幕的 URL。然而,如果因在虚拟环境、docker 或另一设备上运行 HA 而出现问题,并且无法确定实际 URL,可能会遇到 404 未找到错误。如果发生这种情况,以正常方式选择它(HA 设备和服务 > 集成 > iCloud3 > 配置设置齿轮),并将浏览器中的 URL 复制到此字段。" + } + } + } + }, + "services": { + "action": { + "name": "Action", + "description": "此服务将向 iCloud3 发送操作命令", + "fields": { + "command": { + "name": "Command", + "description": "(必需) 要发送到 iCloud3 的操作命令" + }, + "device_name": { + "name": "Device Name", + "description": "(可选) 适用于所有设备或仅适用于所选设备" + } + } + }, + "update": { + "name": "Update", + "description": "更新服务已由 Action 服务替代" + }, + "restart": { + "name": "Restart", + "description": "此服务将重启 iCloud3" + }, + "find_iphone_alert": { + "name": "Find iPhone Alert Tone", + "description": "此服务将向您想要找到的设备发送警报音", + "fields": { + "device_name": { + "name": "Device Name", + "description": "应发送 Find iPhone 警报和消息的设备" + } + } + }, + "lost_device_alert": { + "name": "Send Lost Device Message", + "description": "此服务将向丢失的 iPhone 发送消息和电话号码", + "fields": { + "device_name": { + "name": "Device Name", + "description": "应发送 Find iPhone 警报和消息的设备" + }, + "number": { + "name": "Phone Number", + "description": "要发送消息的电话号码" + }, + "message": { + "name": "Message", + "description": "要发送的消息" + } + } + } + } +} \ No newline at end of file