mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-01 05:02:34 +00:00
Merge branch '94-add-gps-reporting-to-the-background-service' of ssh://github.com/house-of-abbey/GarminHomeAssistant into 94-add-gps-reporting-to-the-background-service
This commit is contained in:
@ -106,12 +106,12 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
|
||||
var activity = Activity.getProfileInfo().sport;
|
||||
var sub_activity = Activity.getProfileInfo().subSport;
|
||||
data.add({
|
||||
"state" => activity ? activity : -1,
|
||||
"state" => activity != null ? activity : -1,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "activity"
|
||||
});
|
||||
data.add({
|
||||
"state" => sub_activity ? sub_activity : -1,
|
||||
"state" => sub_activity != null ? sub_activity : -1,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "sub_activity"
|
||||
});
|
||||
|
@ -186,7 +186,7 @@ class WebhookManager {
|
||||
var activity = Activity.getProfileInfo().sport;
|
||||
registerWebhookSensor({
|
||||
"name" => "Activity",
|
||||
"state" => activity ? activity : -1,
|
||||
"state" => activity != null ? activity : -1,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "activity",
|
||||
"disabled" => false
|
||||
@ -199,7 +199,7 @@ class WebhookManager {
|
||||
var sub_activity = Activity.getProfileInfo().subSport;
|
||||
registerWebhookSensor({
|
||||
"name" => "Sub-activity",
|
||||
"state" => sub_activity ? sub_activity : -1,
|
||||
"state" => sub_activity != null ? sub_activity : -1,
|
||||
"type" => "sensor",
|
||||
"unique_id" => "sub_activity",
|
||||
"disabled" => false
|
||||
|
Reference in New Issue
Block a user