From 9035efee10909312072a4f9831060b522054ee6c Mon Sep 17 00:00:00 2001
From: Franck Nijhof <frenck@frenck.nl>
Date: Wed, 4 Sep 2019 01:02:42 +0200
Subject: [PATCH] Fixes invalid JSON files and whitespace corrections in YAML
 files (#26396)

---
 .devcontainer/devcontainer.json               |  63 +++----
 .vscode/tasks.json                            | 178 +++++++++---------
 .../components/ihc/ihc_auto_setup.yaml        |   2 +-
 homeassistant/components/knx/services.yaml    |   4 +-
 homeassistant/components/lcn/services.yaml    |  15 +-
 .../persistent_notification/services.yaml     |   2 +-
 homeassistant/components/point/strings.json   |   2 +-
 homeassistant/components/solax/manifest.json  |   1 -
 .../components/utility_meter/services.yaml    |   6 +-
 homeassistant/components/zha/services.yaml    |  14 +-
 tests/fixtures/ring_oauth.json                |   4 +-
 11 files changed, 142 insertions(+), 149 deletions(-)

diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 22bd4384b23..e747e8fdb98 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -1,35 +1,32 @@
 // See https://aka.ms/vscode-remote/devcontainer.json for format details.
 {
-	"name": "Home Assistant Dev",
-	"context": "..",
-	"dockerFile": "../Dockerfile.dev",
-	"postCreateCommand": "pip3 install -e .",
-	"appPort": 8123,
-	"runArgs": [
-		"-e",
-		"GIT_EDITOR=\"code --wait\""
-	],
-	"extensions": [
-		"ms-python.python",
-		"ms-azure-devops.azure-pipelines",
-		"redhat.vscode-yaml"
-	],
-	"settings": {
-		"python.pythonPath": "/usr/local/bin/python",
-		"python.linting.pylintEnabled": true,
-		"python.linting.enabled": true,
-		"python.formatting.provider": "black",
-		"editor.formatOnPaste": false,
-		"editor.formatOnSave": true,
-		"editor.formatOnType": true,
-		"files.trimTrailingWhitespace": true,
-		"terminal.integrated.shell.linux": "/bin/bash",
-		"yaml.customTags": [
-			"!secret scalar",
-			"!include_dir_named scalar",
-			"!include_dir_list scalar",
-			"!include_dir_merge_list scalar",
-			"!include_dir_merge_named scalar"
-		]
-	}
-}
\ No newline at end of file
+  "name": "Home Assistant Dev",
+  "context": "..",
+  "dockerFile": "../Dockerfile.dev",
+  "postCreateCommand": "pip3 install -e .",
+  "appPort": 8123,
+  "runArgs": ["-e", "GIT_EDITOR=\"code --wait\""],
+  "extensions": [
+    "ms-python.python",
+    "ms-azure-devops.azure-pipelines",
+    "redhat.vscode-yaml"
+  ],
+  "settings": {
+    "python.pythonPath": "/usr/local/bin/python",
+    "python.linting.pylintEnabled": true,
+    "python.linting.enabled": true,
+    "python.formatting.provider": "black",
+    "editor.formatOnPaste": false,
+    "editor.formatOnSave": true,
+    "editor.formatOnType": true,
+    "files.trimTrailingWhitespace": true,
+    "terminal.integrated.shell.linux": "/bin/bash",
+    "yaml.customTags": [
+      "!secret scalar",
+      "!include_dir_named scalar",
+      "!include_dir_list scalar",
+      "!include_dir_merge_list scalar",
+      "!include_dir_merge_named scalar"
+    ]
+  }
+}
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index e6f38920d7d..f57c182809b 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -1,92 +1,90 @@
 {
-    "version": "2.0.0",
-    "tasks": [
-        {
-            "label": "Preview",
-            "type": "shell",
-            "command": "hass -c ./config",
-            "group": {
-                "kind": "test",
-                "isDefault": true,
-            },
-            "presentation": {
-                "reveal": "always",
-                "panel": "new"
-            },
-            "problemMatcher": []
-        },
-        {
-            "label": "Pytest",
-            "type": "shell",
-            "command": "pytest --timeout=10 tests",
-            "group": {
-                "kind": "test",
-                "isDefault": true,
-            },
-            "presentation": {
-                "reveal": "always",
-                "panel": "new"
-            },
-            "problemMatcher": []
-        },
-        {
-            "label": "Flake8",
-            "type": "shell",
-            "command": "flake8 homeassistant tests",
-            "group": {
-                "kind": "test",
-                "isDefault": true,
-            },
-            "presentation": {
-                "reveal": "always",
-                "panel": "new"
-            },
-            "problemMatcher": []
-        },
-        {
-            "label": "Pylint",
-            "type": "shell",
-            "command": "pylint homeassistant",
-            "dependsOn": [
-                "Install all Requirements"
-            ],
-            "group": {
-                "kind": "test",
-                "isDefault": true,
-            },
-            "presentation": {
-                "reveal": "always",
-                "panel": "new"
-            },
-            "problemMatcher": []
-        },
-        {
-            "label": "Generate Requirements",
-            "type": "shell",
-            "command": "./script/gen_requirements_all.py",
-            "group": {
-                "kind": "build",
-                "isDefault": true
-            },
-            "presentation": {
-                "reveal": "always",
-                "panel": "new"
-            },
-            "problemMatcher": []
-        },
-        {
-            "label": "Install all Requirements",
-            "type": "shell",
-            "command": "pip3 install -r requirements_all.txt -c homeassistant/package_constraints.txt",
-            "group": {
-                "kind": "build",
-                "isDefault": true
-            },
-            "presentation": {
-                "reveal": "always",
-                "panel": "new"
-            },
-            "problemMatcher": []
-        }
-    ]
+  "version": "2.0.0",
+  "tasks": [
+    {
+      "label": "Preview",
+      "type": "shell",
+      "command": "hass -c ./config",
+      "group": {
+        "kind": "test",
+        "isDefault": true
+      },
+      "presentation": {
+        "reveal": "always",
+        "panel": "new"
+      },
+      "problemMatcher": []
+    },
+    {
+      "label": "Pytest",
+      "type": "shell",
+      "command": "pytest --timeout=10 tests",
+      "group": {
+        "kind": "test",
+        "isDefault": true
+      },
+      "presentation": {
+        "reveal": "always",
+        "panel": "new"
+      },
+      "problemMatcher": []
+    },
+    {
+      "label": "Flake8",
+      "type": "shell",
+      "command": "flake8 homeassistant tests",
+      "group": {
+        "kind": "test",
+        "isDefault": true
+      },
+      "presentation": {
+        "reveal": "always",
+        "panel": "new"
+      },
+      "problemMatcher": []
+    },
+    {
+      "label": "Pylint",
+      "type": "shell",
+      "command": "pylint homeassistant",
+      "dependsOn": ["Install all Requirements"],
+      "group": {
+        "kind": "test",
+        "isDefault": true
+      },
+      "presentation": {
+        "reveal": "always",
+        "panel": "new"
+      },
+      "problemMatcher": []
+    },
+    {
+      "label": "Generate Requirements",
+      "type": "shell",
+      "command": "./script/gen_requirements_all.py",
+      "group": {
+        "kind": "build",
+        "isDefault": true
+      },
+      "presentation": {
+        "reveal": "always",
+        "panel": "new"
+      },
+      "problemMatcher": []
+    },
+    {
+      "label": "Install all Requirements",
+      "type": "shell",
+      "command": "pip3 install -r requirements_all.txt -c homeassistant/package_constraints.txt",
+      "group": {
+        "kind": "build",
+        "isDefault": true
+      },
+      "presentation": {
+        "reveal": "always",
+        "panel": "new"
+      },
+      "problemMatcher": []
+    }
+  ]
 }
diff --git a/homeassistant/components/ihc/ihc_auto_setup.yaml b/homeassistant/components/ihc/ihc_auto_setup.yaml
index 81d5bf37977..0495ed58458 100644
--- a/homeassistant/components/ihc/ihc_auto_setup.yaml
+++ b/homeassistant/components/ihc/ihc_auto_setup.yaml
@@ -1,6 +1,6 @@
 # IHC auto setup configuration.
 # To customize this, copy this file to the home assistant configuration
-# folder and make your changes. 
+# folder and make your changes.
 
 binary_sensor:
     # Magnet contact
diff --git a/homeassistant/components/knx/services.yaml b/homeassistant/components/knx/services.yaml
index 5b751bac17c..5faaf0678d1 100644
--- a/homeassistant/components/knx/services.yaml
+++ b/homeassistant/components/knx/services.yaml
@@ -1,9 +1,9 @@
 send:
   description: "Send arbitrary data directly to the KNX bus."
   fields:
-    address: 
+    address:
       description: "Group address(es) to write to."
       example: "1/1/0"
-    payload: 
+    payload:
       description: "Payload to send to the bus. Integers are treated as DPT 1/2/3 payloads. For DPTs > 6 bits send a list. Each value represents 1 octet (0-255). Pad with 0 to DPT byte length."
       example: "[0, 4]"
diff --git a/homeassistant/components/lcn/services.yaml b/homeassistant/components/lcn/services.yaml
index b8f4fbb20a7..80c636577f8 100644
--- a/homeassistant/components/lcn/services.yaml
+++ b/homeassistant/components/lcn/services.yaml
@@ -14,7 +14,7 @@ output_abs:
       example: 50
     transition:
       description: Transition time in seconds
-      example: 5  
+      example: 5
 
 output_rel:
   description: Set relative brightness of output port in percent.
@@ -30,7 +30,7 @@ output_rel:
       example: 50
     transition:
       description: Transition time in seconds
-      example: 5  
+      example: 5
 
 output_toggle:
   description: Toggle output port.
@@ -43,7 +43,7 @@ output_toggle:
       example: "output1"
     transition:
       description: Transition time in seconds
-      example: 5  
+      example: 5
 
 relays:
   description: Set the relays status.
@@ -72,7 +72,7 @@ led:
         - off
         - blink
         - flicker
-  
+
 var_abs:
   description: Set absolute value of a variable or setpoint.
   fields:
@@ -88,7 +88,7 @@ var_abs:
     unit_of_measurement:
       description: Unit of value
       example: 'celsius'
-      
+
 var_reset:
   description: Reset value of variable or setpoint.
   fields:
@@ -98,7 +98,7 @@ var_reset:
     variable:
       description: Variable or setpoint name
       example: 'var1'
-      
+
 var_rel:
   description: Shift value of a variable, setpoint or threshold.
   fields:
@@ -188,7 +188,7 @@ dyn_text:
     text:
       description: Text to send (up to 60 characters encoded as UTF-8)
       example: 'text up to 60 characters'
- 
+
 pck:
   description: Send arbitrary PCK command.
   fields:
@@ -198,4 +198,3 @@ pck:
     pck:
       description: PCK command (without address header)
       example: 'PIN4'
-  
\ No newline at end of file
diff --git a/homeassistant/components/persistent_notification/services.yaml b/homeassistant/components/persistent_notification/services.yaml
index 496ab9199c3..d026896a7c5 100644
--- a/homeassistant/components/persistent_notification/services.yaml
+++ b/homeassistant/components/persistent_notification/services.yaml
@@ -17,7 +17,7 @@ dismiss:
     notification_id:
       description: Target ID of the notification, which should be removed. [Required]
       example: 1234
-      
+
 mark_read:
   description: Mark a notification read.
   fields:
diff --git a/homeassistant/components/point/strings.json b/homeassistant/components/point/strings.json
index 642a61a5f9d..e5491a8bbee 100644
--- a/homeassistant/components/point/strings.json
+++ b/homeassistant/components/point/strings.json
@@ -29,4 +29,4 @@
       "authorize_url_fail": "Unknown error generating an authorize url."
     }
   }
-} 
+}
diff --git a/homeassistant/components/solax/manifest.json b/homeassistant/components/solax/manifest.json
index 14598607ada..52e50ab4799 100644
--- a/homeassistant/components/solax/manifest.json
+++ b/homeassistant/components/solax/manifest.json
@@ -8,4 +8,3 @@
     "dependencies": [],
     "codeowners": ["@squishykid"]
   }
-  
\ No newline at end of file
diff --git a/homeassistant/components/utility_meter/services.yaml b/homeassistant/components/utility_meter/services.yaml
index 7c09117d48f..5437f4b83a6 100644
--- a/homeassistant/components/utility_meter/services.yaml
+++ b/homeassistant/components/utility_meter/services.yaml
@@ -4,21 +4,21 @@ reset:
   description: Resets the counter of an utility meter.
   fields:
     entity_id:
-      description: Name(s) of the utility meter to reset 
+      description: Name(s) of the utility meter to reset
       example: 'utility_meter.energy'
 
 next_tariff:
   description: Changes the tariff to the next one.
   fields:
     entity_id:
-      description: Name(s) of entities to reset 
+      description: Name(s) of entities to reset
       example: 'utility_meter.energy'
 
 select_tariff:
   description: selects the current tariff of an utility meter.
   fields:
     entity_id:
-      description: Name of the entity to set the tariff for 
+      description: Name of the entity to set the tariff for
       example: 'utility_meter.energy'
     tariff:
       description: Name of the tariff to switch to
diff --git a/homeassistant/components/zha/services.yaml b/homeassistant/components/zha/services.yaml
index 048054077f8..ffd5aa21472 100644
--- a/homeassistant/components/zha/services.yaml
+++ b/homeassistant/components/zha/services.yaml
@@ -18,19 +18,19 @@ remove:
       example: "00:0d:6f:00:05:7d:2d:34"
 
 reconfigure_device:
-  description: >- 
-    Reconfigure ZHA device (heal device). Use this if you are having issues 
+  description: >-
+    Reconfigure ZHA device (heal device). Use this if you are having issues
     with the device. If the device in question is a battery powered device
     please ensure it is awake and accepting commands when you use this
-    service. 
+    service.
   fields:
     ieee_address:
       description: IEEE address of the device to reconfigure
       example: "00:0d:6f:00:05:7d:2d:34"
 
 set_zigbee_cluster_attribute:
-  description: >- 
-    Set attribute value for the specified cluster on the specified entity. 
+  description: >-
+    Set attribute value for the specified cluster on the specified entity.
   fields:
     ieee:
       description: IEEE address for the device
@@ -55,8 +55,8 @@ set_zigbee_cluster_attribute:
       example: 0x00FC
 
 issue_zigbee_cluster_command:
-  description: >- 
-    Issue command on the specified cluster on the specified entity. 
+  description: >-
+    Issue command on the specified cluster on the specified entity.
   fields:
     ieee:
       description: IEEE address for the device
diff --git a/tests/fixtures/ring_oauth.json b/tests/fixtures/ring_oauth.json
index 5e69ddde065..2dbc78c48d2 100644
--- a/tests/fixtures/ring_oauth.json
+++ b/tests/fixtures/ring_oauth.json
@@ -1,8 +1,8 @@
 {
-    "access_token": "eyJ0eWfvEQwqfJNKyQ9999", 
+    "access_token": "eyJ0eWfvEQwqfJNKyQ9999",
     "token_type": "bearer",
     "expires_in": 3600,
     "refresh_token": "67695a26bdefc1ac8999",
-    "scope": "client", 
+    "scope": "client",
     "created_at": 1529099870
 }
-- 
GitLab