mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-04-30 04:32:26 +00:00
Fixed merge conflict
Fixed a merge conflict made by more recent changes to fix a bug (https://github.com/house-of-abbey/GarminHomeAssistant/pull/164)
This commit is contained in:
@ -24,7 +24,8 @@
|
||||
| 2.9 | Added an option to enable confirmation vibration so it can be turned off by request of a user. Removed a redundant setting for the alternative Widget version that was not removed previously, and fixed a bug with dereferencing Null. |
|
||||
| 2.10 | Added a user requested feature to slow down the rate of API calls in order to reduce battery wear for a situation where the application is kept open permanently on the device for convenience. Added 4 new devices. |
|
||||
| 2.11 | Bug fix release for menu caching being turned off and language corrections (Czech & Slovenian). |
|
||||
| 2.12 | Re-enabled Edge 540 and Edge 840 devices which we are unable to support due to simulator issues, but the Edge 840 device has been confirmed as working by a @Petucky. |
|
||||
| 2.12 | Re-enabled Edge 540 and Edge 840 devices which we are unable to support due to simulator issues, but the Edge 840 device has been confirmed as working by a [Petucky](https://github.com/Petucky). |
|
||||
| 2.13 | Moved the template status queries to Webhooks in order to fix the situation where an account is a non-privileged user. Added telemetry update on activity completion to make automations more timely at the end of an activity. When using a polling delay, there is no longer a startup delay for status updates and an action will trigger an immediate round of updates. |
|
||||
| 2.14 | Cautionary bug fix for the background service code where refactorisation spoilt some API level guard clauses. |
|
||||
| 2.15 | Better support for templates by isolating erroneous returns and marking the menu item. |
|
||||
| 2.16 | Bug fix for lack of phone connection when starting the application. Includes new activity reporting features from [KPWhiver](https://github.com/KPWhiver) covering steps, heart rate, floors climbed and descended, and respiration rate. |
|
||||
|
@ -70,25 +70,29 @@ class Settings {
|
||||
// Manage this inside the application or widget only (not a glance or background service process)
|
||||
if (mIsApp) {
|
||||
if (mHasService) {
|
||||
mWebhookManager = new WebhookManager();
|
||||
if (getWebhookId().equals("")) {
|
||||
// System.println("Settings update(): Doing full webhook & sensor creation.");
|
||||
mWebhookManager.requestWebhookId();
|
||||
} else {
|
||||
// System.println("Settings update(): Doing just sensor creation.");
|
||||
// We already have a Webhook ID, so just enable or disable the sensor in Home Assistant.
|
||||
mWebhookManager.registerWebhookSensors();
|
||||
}
|
||||
if (mIsSensorsLevelEnabled) {
|
||||
// Create the timed activity
|
||||
if ((Background.getTemporalEventRegisteredTime() == null) or
|
||||
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) {
|
||||
Background.registerForTemporalEvent(new Time.Duration(mBatteryRefreshRate * 60)); // Convert to seconds
|
||||
Background.registerForActivityCompletedEvent();
|
||||
if (System.getDeviceSettings().phoneConnected) {
|
||||
mWebhookManager = new WebhookManager();
|
||||
if (getWebhookId().equals("")) {
|
||||
// System.println("Settings update(): Doing full webhook & sensor creation.");
|
||||
mWebhookManager.requestWebhookId();
|
||||
} else {
|
||||
// System.println("Settings update(): Doing just sensor creation.");
|
||||
// We already have a Webhook ID, so just enable or disable the sensor in Home Assistant.
|
||||
mWebhookManager.registerWebhookSensors();
|
||||
}
|
||||
} else if (Background.getTemporalEventRegisteredTime() != null) {
|
||||
Background.deleteTemporalEvent();
|
||||
Background.deleteActivityCompletedEvent();
|
||||
if (mIsSensorsLevelEnabled) {
|
||||
// Create the timed activity
|
||||
if ((Background.getTemporalEventRegisteredTime() == null) or
|
||||
(Background.getTemporalEventRegisteredTime() != (mBatteryRefreshRate * 60))) {
|
||||
Background.registerForTemporalEvent(new Time.Duration(mBatteryRefreshRate * 60)); // Convert to seconds
|
||||
Background.registerForActivityCompletedEvent();
|
||||
}
|
||||
} else if (Background.getTemporalEventRegisteredTime() != null) {
|
||||
Background.deleteTemporalEvent();
|
||||
Background.deleteActivityCompletedEvent();
|
||||
}
|
||||
} else {
|
||||
ErrorView.show(WatchUi.loadResource($.Rez.Strings.NoPhone) as Lang.String);
|
||||
}
|
||||
} else {
|
||||
// Explicitly disable the background event which persists when the application closes.
|
||||
|
Reference in New Issue
Block a user