mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2026-05-18 10:54:28 +00:00
Amended documentation about special characters in the glance view
And a couple of code tidy items too.
This commit is contained in:
@@ -122,6 +122,7 @@ class HomeAssistantService {
|
||||
//!
|
||||
//! @param action The Home Assistant action to be run, e.g. from the JSON `action` field.
|
||||
//! @param data Data to be supplied to the action call.
|
||||
//! @param exit Whether to exit the app after making the call.
|
||||
//
|
||||
function call(
|
||||
action as Lang.String,
|
||||
|
||||
@@ -228,9 +228,7 @@ class HomeAssistantToggleMenuItem extends WatchUi.ToggleMenuItem {
|
||||
// If there's no response body, let's assume that what we did actually happened and flip the toggle.
|
||||
if (data.size() == 0) {
|
||||
setEnabled(!isEnabled());
|
||||
}
|
||||
|
||||
else {
|
||||
} else {
|
||||
for(var i = 0; i < data.size(); i++) {
|
||||
if ((data[i].get("entity_id") as Lang.String).equals(mData.get("entity_id"))) {
|
||||
var state = data[i].get("state") as Lang.String;
|
||||
|
||||
Reference in New Issue
Block a user