From 61f4838e56ca6e43f9a41533de375b2c9d4dccf4 Mon Sep 17 00:00:00 2001 From: Erik Seglem Date: Sat, 14 Jan 2023 15:46:02 -0500 Subject: [PATCH] Update devcontainer and vscode settings. --- .devcontainer/configuration.yaml | 5 ++++- .devcontainer/devcontainer.json | 3 +-- .vscode/launch.json | 34 ++++++++++++++++++++++++++++++++ .vscode/tasks.json | 29 +++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.devcontainer/configuration.yaml b/.devcontainer/configuration.yaml index ef9a42d..2cf1198 100644 --- a/.devcontainer/configuration.yaml +++ b/.devcontainer/configuration.yaml @@ -4,12 +4,15 @@ wattbox: - host: !secret wattbox_ip name: wattbox scan_interval: 00:00:05 + username: !secret wattbox_username + password: !secret wattbox_password - host: !secret wattbox_ip name: wattbox2 scan_interval: 00:00:05 + username: !secret wattbox_username + password: !secret wattbox_password logger: default: info logs: custom_components.wattbox: debug - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7d6ca3a..616842d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,8 +16,7 @@ "settings": { "files.eol": "\n", "editor.tabSize": 4, - "terminal.integrated.shell.linux": "/bin/bash", - "python.pythonPath": "/usr/bin/python3", + "terminal.integrated.defaultProfile.linux": "bash", "python.analysis.autoSearchPaths": false, "python.linting.pylintEnabled": true, "python.linting.enabled": true, diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f2f6c44 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,34 @@ +{ + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + // Example of attaching to local debug server + "name": "Python: Attach Local", + "type": "python", + "request": "attach", + "port": 5678, + "host": "localhost", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "." + } + ] + }, + { + // Example of attaching to my production server + "name": "Python: Attach Remote", + "type": "python", + "request": "attach", + "port": 5678, + "host": "homeassistant.local", + "pathMappings": [ + { + "localRoot": "${workspaceFolder}", + "remoteRoot": "/usr/src/homeassistant" + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..4be7b81 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,29 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Run Home Assistant on port 9123", + "type": "shell", + "command": "container start", + "problemMatcher": [] + }, + { + "label": "Run Home Assistant configuration against /config", + "type": "shell", + "command": "container check-config", + "problemMatcher": [] + }, + { + "label": "Upgrade Home Assistant to latest dev", + "type": "shell", + "command": "container install", + "problemMatcher": [] + }, + { + "label": "Install a specific version of Home Assistant", + "type": "shell", + "command": "container set-version", + "problemMatcher": [] + } + ] +} \ No newline at end of file