Skip to content

Latest commit

 

History

History
126 lines (77 loc) · 2.18 KB

README.md

File metadata and controls

126 lines (77 loc) · 2.18 KB

Automation Standalone 🏡💻🐳

Welcome to the Digital Alchemy standalone automation repository!

Purpose

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.

Community

Setup

Prerequisites

These tools need to be installed on your machine:

  • Volta - Autonomously manages Node and Yarn versions
  • Docker desktop - For packaging the application

Clone

Clone the repository to your local machine:

git clone git@github.com/Digital-Alchemy-TS/automation-standalone.git

Change directory

Change directory to the repository root:

cd automation-standalone

Install

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

Configure

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.

Usage

Sync

Synchronize the latest DA packages and write types based on your HA instance

yarn type-writer

Run

Run your automations locally

yarn dev

Testing

Unit tests and integration tests

Run all your tests

yarn test

End-to-end tests

See ./playground folder readme.

Publication

Build

Build the application

yarn build

Publish

Build and publish your application to a docker registry

yarn publish

Deploy

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.

📄 License

This project is licensed under the MIT License, as detailed in the LICENSE file.