mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-18 04:18:35 +00:00
Cosmetic
This commit is contained in:
@ -50,13 +50,13 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
|
|||||||
"type" => "update_sensor_states",
|
"type" => "update_sensor_states",
|
||||||
"data" => [
|
"data" => [
|
||||||
{
|
{
|
||||||
"state" => System.getSystemStats().battery,
|
"state" => System.getSystemStats().battery,
|
||||||
"type" => "sensor",
|
"type" => "sensor",
|
||||||
"unique_id" => "battery_level"
|
"unique_id" => "battery_level"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"state" => System.getSystemStats().charging,
|
"state" => System.getSystemStats().charging,
|
||||||
"type" => "binary_sensor",
|
"type" => "binary_sensor",
|
||||||
"unique_id" => "battery_is_charging"
|
"unique_id" => "battery_is_charging"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -64,7 +64,7 @@ class BackgroundServiceDelegate extends System.ServiceDelegate {
|
|||||||
{
|
{
|
||||||
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
:method => Communications.HTTP_REQUEST_METHOD_POST,
|
||||||
:headers => {
|
:headers => {
|
||||||
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
"Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON
|
||||||
},
|
},
|
||||||
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
:responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON
|
||||||
},
|
},
|
||||||
|
@ -35,9 +35,7 @@ class HomeAssistantView extends WatchUi.Menu2 {
|
|||||||
} or Null
|
} or Null
|
||||||
) {
|
) {
|
||||||
if (options == null) {
|
if (options == null) {
|
||||||
options = {
|
options = { :title => definition.get("title") as Lang.String };
|
||||||
:title => definition.get("title") as Lang.String
|
|
||||||
};
|
|
||||||
} else {
|
} else {
|
||||||
options.put(:title, definition.get("title") as Lang.String);
|
options.put(:title, definition.get("title") as Lang.String);
|
||||||
}
|
}
|
||||||
|
@ -108,9 +108,7 @@ class WebLog {
|
|||||||
// System.println(buffer);
|
// System.println(buffer);
|
||||||
Communications.makeWebRequest(
|
Communications.makeWebRequest(
|
||||||
ClientId.webLogUrl,
|
ClientId.webLogUrl,
|
||||||
{
|
{ "log" => buffer },
|
||||||
"log" => buffer
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
:method => Communications.HTTP_REQUEST_METHOD_GET,
|
:method => Communications.HTTP_REQUEST_METHOD_GET,
|
||||||
:headers => {
|
:headers => {
|
||||||
|
Reference in New Issue
Block a user