Welcome to the Digital Alchemy standalone automation repository!
This repository is designed to work both locally and deployed as a docker container. The container will interact with the HomeAssistant websocket to fulfill its automation goals.
- 📚 Documentation
- 🗣️ Discord
These tools need to be installed on your machine:
- Volta - Autonomously manages Node and Yarn versions
- Docker desktop - For packaging the application
Clone the repository to your local machine:
git clone git@github.com/Digital-Alchemy-TS/automation-standalone.git
Change directory to the repository root:
cd automation-standalone
Optional: If you don't have Volta installed, you must enable Corepack to use the correct Yarn version.
npm uninstall -g yarn pnpm
corepack enable
Install dependencies using Yarn:
yarn
Create a .env
file from the .env.dist
example file.
cp .env.dist .env
Then, configure each variable in .env
so that the application can connect to your HA instance.
Synchronize the latest DA packages and write types based on your HA instance
yarn type-writer
Run your automations locally
yarn dev
Run all your tests
yarn test
See ./playground folder readme.
Build the application
yarn build
Build and publish your application to a docker registry
yarn publish
For now, this will be considered a manual step. Basically all you have to do is pull the image that you've just pushed.
Note: make sure that the same variables from
.env.dist
are passed into the container at runtime.
This project is licensed under the MIT License, as detailed in the LICENSE file.