From 91e39f885f924c809d42dfe4968c741a23f5c495 Mon Sep 17 00:00:00 2001 From: Paulo Ferreira de Castro Date: Fri, 16 Feb 2024 06:30:37 +0000 Subject: [PATCH] Improvements to the development environment (#383) * Update Home Assistant dev version in requirements_dev.txt * Avoid "Error starting FFmpeg" error in VSCode dev container logs * Add "editor.formatOnSaveMode": "modifications" to .vscode/settings.json --- .devcontainer/Dockerfile | 2 ++ .devcontainer/configuration.yaml | 3 --- .devcontainer/devcontainer.json | 4 +++- .vscode/settings.json | 3 ++- requirements_dev.txt | 3 +-- 5 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..7bcc297 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,2 @@ +FROM mcr.microsoft.com/devcontainers/python:1-3.11 +RUN apt update && apt install -y ffmpeg diff --git a/.devcontainer/configuration.yaml b/.devcontainer/configuration.yaml index 724f8cb..0c73515 100644 --- a/.devcontainer/configuration.yaml +++ b/.devcontainer/configuration.yaml @@ -1,8 +1,5 @@ default_config: -# ffmeg -ffmpeg: - logger: default: info logs: diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ccc2160..881d176 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,9 @@ // See https://aka.ms/vscode-remote/devcontainer.json for format details. // "image": "ghcr.io/ludeeus/devcontainer/integration:latest", { - "image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye", + "build": { + "dockerfile": "Dockerfile" + }, "name": "Versatile Thermostat integration", "appPort": [ "8123:8123" diff --git a/.vscode/settings.json b/.vscode/settings.json index ef6794b..a78c91f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,8 @@ { "[python]": { "editor.defaultFormatter": "ms-python.black-formatter", - "editor.formatOnSave": true + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "modifications" }, "pylint.lintOnChange": false, "files.associations": { diff --git a/requirements_dev.txt b/requirements_dev.txt index ebc5953..afaeae0 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,2 +1 @@ -homeassistant==2023.12.1 -ffmpeg \ No newline at end of file +homeassistant==2024.2.1