Set up a Development Environment¶
A docker-compose.yml is provided to spin up a test Home Assistant instance
with the component pre-installed.
- Copy the environment template:
- Edit
docker/.envand set your MQTT broker address and port. ebusd needs to be running and publishing already; it's not included in this setup. - Start the container:
- Access Home Assistant at http://localhost:8123 and log in with
test/test. - You should find devices in the integration.
Pre-commit¶
This repository uses pre-commit to run linting, formatting, and consistency checks.
Install the hooks:
Once installed, checks run automatically on every git commit. You can also run them manually:
Running tests¶
Tests use pytest with pytest-homeassistant-custom-component.
Run all tests:
Or run a specific test file: