From 9c001f340250b1bc6034aa93276772b0bcf188fd Mon Sep 17 00:00:00 2001 From: Philip Abbey Date: Mon, 22 Jan 2024 10:28:35 +0000 Subject: [PATCH] Cosmetic --- source/BackgroundServiceDelegate.mc | 10 +++++----- source/HomeAssistantView.mc | 4 +--- source/WebLog.mc | 4 +--- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/source/BackgroundServiceDelegate.mc b/source/BackgroundServiceDelegate.mc index 4c367db..a1746cb 100644 --- a/source/BackgroundServiceDelegate.mc +++ b/source/BackgroundServiceDelegate.mc @@ -50,13 +50,13 @@ class BackgroundServiceDelegate extends System.ServiceDelegate { "type" => "update_sensor_states", "data" => [ { - "state" => System.getSystemStats().battery, - "type" => "sensor", + "state" => System.getSystemStats().battery, + "type" => "sensor", "unique_id" => "battery_level" }, { - "state" => System.getSystemStats().charging, - "type" => "binary_sensor", + "state" => System.getSystemStats().charging, + "type" => "binary_sensor", "unique_id" => "battery_is_charging" } ] @@ -64,7 +64,7 @@ class BackgroundServiceDelegate extends System.ServiceDelegate { { :method => Communications.HTTP_REQUEST_METHOD_POST, :headers => { - "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON + "Content-Type" => Communications.REQUEST_CONTENT_TYPE_JSON }, :responseType => Communications.HTTP_RESPONSE_CONTENT_TYPE_JSON }, diff --git a/source/HomeAssistantView.mc b/source/HomeAssistantView.mc index 81218ab..a518a29 100644 --- a/source/HomeAssistantView.mc +++ b/source/HomeAssistantView.mc @@ -35,9 +35,7 @@ class HomeAssistantView extends WatchUi.Menu2 { } or Null ) { if (options == null) { - options = { - :title => definition.get("title") as Lang.String - }; + options = { :title => definition.get("title") as Lang.String }; } else { options.put(:title, definition.get("title") as Lang.String); } diff --git a/source/WebLog.mc b/source/WebLog.mc index 39eb606..247e0f2 100644 --- a/source/WebLog.mc +++ b/source/WebLog.mc @@ -108,9 +108,7 @@ class WebLog { // System.println(buffer); Communications.makeWebRequest( ClientId.webLogUrl, - { - "log" => buffer - }, + { "log" => buffer }, { :method => Communications.HTTP_REQUEST_METHOD_GET, :headers => {