mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-16 19:38:34 +00:00
Added Watch Battery transmission
Added a background service to send the watch battery level to Home Assistant. Changed the Glance View as requested by a user. Updated to new HA icon using SVG in stead of PNG.
This commit is contained in:
@ -40,10 +40,10 @@ class HomeAssistantConfirmationDelegate extends WatchUi.ConfirmationDelegate {
|
||||
function initialize(callback as Method() as Void) {
|
||||
WatchUi.ConfirmationDelegate.initialize();
|
||||
mConfirmMethod = callback;
|
||||
var timeoutSeconds = Properties.getValue("confirm_timeout") as Lang.Number;
|
||||
if (timeoutSeconds > 0) {
|
||||
var timeout = Settings.get().getConfirmTimeout(); // ms
|
||||
if (timeout > 0) {
|
||||
mTimer = new Timer.Timer();
|
||||
mTimer.start(method(:onTimeout), timeoutSeconds * 1000, true);
|
||||
mTimer.start(method(:onTimeout), timeout, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user