From 3266ef8a526c8c4a88c8372c7cb9a49d100a9a9a Mon Sep 17 00:00:00 2001 From: Constantin Pascal Date: Tue, 30 Dec 2025 17:25:05 +0200 Subject: [PATCH] Trying to setup dev container --- .devcontainer/devcontainer.json | 22 +++++++++++++++++++ .idea/.gitignore | 8 +++++++ config/configuration.yaml | 8 +++++++ .../modbus_rtu_monitor/__init__.py | 0 .../modbus_rtu_monitor/binary_sensor.py | 0 .../modbus_rtu_monitor/claude.md | 0 .../modbus_rtu_monitor/climate.py | 0 .../modbus_rtu_monitor/config_flow.py | 0 .../modbus_rtu_monitor/const.py | 0 .../modbus_rtu_monitor/coordinator.py | 0 .../modbus_rtu_monitor/hub.py | 0 .../modbus_rtu_monitor/manifest.json | 0 .../modbus_rtu_monitor/sensor.py | 0 .../modbus_rtu_monitor/strings.json | 0 14 files changed, 38 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100644 .idea/.gitignore create mode 100644 config/configuration.yaml rename __init__.py => custom_components/modbus_rtu_monitor/__init__.py (100%) rename binary_sensor.py => custom_components/modbus_rtu_monitor/binary_sensor.py (100%) rename claude.md => custom_components/modbus_rtu_monitor/claude.md (100%) rename climate.py => custom_components/modbus_rtu_monitor/climate.py (100%) rename config_flow.py => custom_components/modbus_rtu_monitor/config_flow.py (100%) rename const.py => custom_components/modbus_rtu_monitor/const.py (100%) rename coordinator.py => custom_components/modbus_rtu_monitor/coordinator.py (100%) rename hub.py => custom_components/modbus_rtu_monitor/hub.py (100%) rename manifest.json => custom_components/modbus_rtu_monitor/manifest.json (100%) rename sensor.py => custom_components/modbus_rtu_monitor/sensor.py (100%) rename strings.json => custom_components/modbus_rtu_monitor/strings.json (100%) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..6ad19b6 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,22 @@ +{ + "name": "My HA Component Dev", + + // Use a simple Python image + "image": "mcr.microsoft.com/devcontainers/python:3.12", + + // Forward HA port to your Mac + "forwardPorts": [8123], + + // Install Home Assistant when container is created + "postCreateCommand": "pip install homeassistant", + + // Mount your local folders into container + "mounts": [ + "source=${localWorkspaceFolder}/custom_components,target=/config/custom_components,type=bind", + "source=${localWorkspaceFolder}/config,target=/config,type=bind" + ], + + // Work from this directory + "workspaceFolder": "/workspace", + "workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind" +} \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/config/configuration.yaml b/config/configuration.yaml new file mode 100644 index 0000000..c5379fe --- /dev/null +++ b/config/configuration.yaml @@ -0,0 +1,8 @@ +# Minimal configuration for development +default_config: + +logger: + default: info + logs: + custom_components.your_component: debug + homeassistant.core: debug diff --git a/__init__.py b/custom_components/modbus_rtu_monitor/__init__.py similarity index 100% rename from __init__.py rename to custom_components/modbus_rtu_monitor/__init__.py diff --git a/binary_sensor.py b/custom_components/modbus_rtu_monitor/binary_sensor.py similarity index 100% rename from binary_sensor.py rename to custom_components/modbus_rtu_monitor/binary_sensor.py diff --git a/claude.md b/custom_components/modbus_rtu_monitor/claude.md similarity index 100% rename from claude.md rename to custom_components/modbus_rtu_monitor/claude.md diff --git a/climate.py b/custom_components/modbus_rtu_monitor/climate.py similarity index 100% rename from climate.py rename to custom_components/modbus_rtu_monitor/climate.py diff --git a/config_flow.py b/custom_components/modbus_rtu_monitor/config_flow.py similarity index 100% rename from config_flow.py rename to custom_components/modbus_rtu_monitor/config_flow.py diff --git a/const.py b/custom_components/modbus_rtu_monitor/const.py similarity index 100% rename from const.py rename to custom_components/modbus_rtu_monitor/const.py diff --git a/coordinator.py b/custom_components/modbus_rtu_monitor/coordinator.py similarity index 100% rename from coordinator.py rename to custom_components/modbus_rtu_monitor/coordinator.py diff --git a/hub.py b/custom_components/modbus_rtu_monitor/hub.py similarity index 100% rename from hub.py rename to custom_components/modbus_rtu_monitor/hub.py diff --git a/manifest.json b/custom_components/modbus_rtu_monitor/manifest.json similarity index 100% rename from manifest.json rename to custom_components/modbus_rtu_monitor/manifest.json diff --git a/sensor.py b/custom_components/modbus_rtu_monitor/sensor.py similarity index 100% rename from sensor.py rename to custom_components/modbus_rtu_monitor/sensor.py diff --git a/strings.json b/custom_components/modbus_rtu_monitor/strings.json similarity index 100% rename from strings.json rename to custom_components/modbus_rtu_monitor/strings.json