Add GPS accuracy to update_location webhook and changed activity reporting

This commit is contained in:
Joseph Abbey
2024-01-27 15:39:22 +00:00
parent 8f372c03e3
commit 6b3a17bea3
2 changed files with 55 additions and 23 deletions

View File

@ -185,13 +185,25 @@ class WebhookManager {
if (Activity has :getProfileInfo) {
registerWebhookSensor({
"name" => "Activity",
"state" => Activity.getProfileInfo().name,
"state" => Activity.getProfileInfo().sport,
"type" => "sensor",
"unique_id" => "activity",
"disabled" => false
}, 2);
break;
}
case 2:
// System.println("WebhookManager onReturnRegisterWebhookSensor(): Registering next sensor: Activity");
if (Activity has :getProfileInfo) {
registerWebhookSensor({
"name" => "Sub-activity",
"state" => Activity.getProfileInfo().subSport,
"type" => "sensor",
"unique_id" => "sub_activity",
"disabled" => false
}, 3);
break;
}
default:
}
} else {