mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-01 13:12:50 +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 activity = Activity.getProfileInfo().sport;
|
||||||
var sub_activity = Activity.getProfileInfo().subSport;
|
var sub_activity = Activity.getProfileInfo().subSport;
|
||||||
data.add({
|
data.add({
|
||||||
"state" => activity ? activity : -1,
|
"state" => activity != null ? activity : -1,
|
||||||
"type" => "sensor",
|
"type" => "sensor",
|
||||||
"unique_id" => "activity"
|
"unique_id" => "activity"
|
||||||
});
|
});
|
||||||
data.add({
|
data.add({
|
||||||
"state" => sub_activity ? sub_activity : -1,
|
"state" => sub_activity != null ? sub_activity : -1,
|
||||||
"type" => "sensor",
|
"type" => "sensor",
|
||||||
"unique_id" => "sub_activity"
|
"unique_id" => "sub_activity"
|
||||||
});
|
});
|
||||||
|
@ -186,7 +186,7 @@ class WebhookManager {
|
|||||||
var activity = Activity.getProfileInfo().sport;
|
var activity = Activity.getProfileInfo().sport;
|
||||||
registerWebhookSensor({
|
registerWebhookSensor({
|
||||||
"name" => "Activity",
|
"name" => "Activity",
|
||||||
"state" => activity ? activity : -1,
|
"state" => activity != null ? activity : -1,
|
||||||
"type" => "sensor",
|
"type" => "sensor",
|
||||||
"unique_id" => "activity",
|
"unique_id" => "activity",
|
||||||
"disabled" => false
|
"disabled" => false
|
||||||
@ -199,7 +199,7 @@ class WebhookManager {
|
|||||||
var sub_activity = Activity.getProfileInfo().subSport;
|
var sub_activity = Activity.getProfileInfo().subSport;
|
||||||
registerWebhookSensor({
|
registerWebhookSensor({
|
||||||
"name" => "Sub-activity",
|
"name" => "Sub-activity",
|
||||||
"state" => sub_activity ? sub_activity : -1,
|
"state" => sub_activity != null ? sub_activity : -1,
|
||||||
"type" => "sensor",
|
"type" => "sensor",
|
||||||
"unique_id" => "sub_activity",
|
"unique_id" => "sub_activity",
|
||||||
"disabled" => false
|
"disabled" => false
|
||||||
|
Reference in New Issue
Block a user