Update BackgroundServiceDelegate.mc

Failed to make commensurate changes to the background service code.
This commit is contained in:
Philip Abbey
2024-08-24 14:21:02 +01:00
parent a424e35784
commit d2aec16811

View File

@ -150,20 +150,26 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
"type" => "sensor",
"unique_id" => "heart_rate",
"icon" => "mdi:heart-pulse"
},
{
}
];
if (ActivityMonitor.Info has :floorsClimbed) {
data.add({
"state" => activityInfo.floorsClimbed == null ? "unknown" : activityInfo.floorsClimbed,
"type" => "sensor",
"unique_id" => "floors_climbed_today",
"icon" => "mdi:stairs-up"
},
{
});
}
if (ActivityMonitor.Info has :floorsDescended) {
data.add({
"state" => activityInfo.floorsDescended == null ? "unknown" : activityInfo.floorsDescended,
"type" => "sensor",
"unique_id" => "floors_descended_today",
"icon" => "mdi:stairs-down"
}
];
});
}
if (ActivityMonitor.Info has :respirationRate) {
data.add({