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