24.10.2 • Published 9 months ago

@digital-alchemy/hass v24.10.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

stars discord codecov version


🏠 Welcome to @digital-alchemy/hass!

This repository contains generic extensions for interacting with Home Assistant, including websocket & REST API adapters, entity & event management, backup workflows, and more.

⭐ Features

📝 First-class Editor Experiences

  • Did you just typo that entity name?
  • Just what services are actually available?

Create references to entities that will always reflect their current state. Get details about all the services your setup supports and how to use them, directly in your editor.

editor

🌐 Managed Websocket

Don't worry about all the complexities of dealing with Home Assistant. Let the library help by handling all the connection logic, keeping track of events for you, formatting requests, and more.

Install

Add as a dependency, and add to your imports. Nice and easy

npm i @digital-alchemy/hass

Add to code

import { LIB_HASS } from "@digital-alchemy/hass";

// application
const MY_APP = CreateApplication({
  libraries: [LIB_HASS],
  name: "home_automation",
})

// library
export const MY_LIBRARY = CreateLibrary({
  depends: [LIB_HASS],
  name: "special_logic",
})

⚙️ Configuration

🛠 Custom Types

This library has support for customizing type definitions to match a particular Home Assistant install. This functionality requires the type-writer command to be installed as well.

Add to devDependencies!

npm i --save-dev @digital-alchemy/type-writer
npx type-writer

Custom types only affect the development experience and have no impact on the way the application runs.

📦 Supervised Support

If your code is running within a Home Assistant addon environment, it will automatically connect with no additional configuration needed.

🖥 Manual

For code running elsewhere, manual configuration is required. You will need a Long Lived Access Token, which can be generated on your user profile. You can store your config at ./.{app_name} or ~/.config/{app_name} in INI format.

Don't forget to configure "type_writer" also!

[hass]
  BASE_URL=http://localhost:8123
  TOKEN=YOUR LONG LIVED ACCESS TOKEN

🤖 Unit Testing

Built in workflows for unit testing using standard test runners like Jest.

🤝 Related Projects

For additional projects that build on and consume this library, check out these other projects:

GitHubDescriptionNPM
synapseTools for generating entities within Home Assistant.@digitial-alchemy/synapse
automationAdvanced automation tools for creating dynamic workflows.@digital-alchemy/automation
type-writerGenerate custom type definitions for your setup.@digital-alchemy/type-writer
automation-templateStart your own Home Automation project with the @digital-alchemy quick start template
24.10.2

9 months ago

24.9.5

10 months ago

24.10.1

10 months ago

24.9.4

10 months ago

0.3.31

1 year ago

0.3.30

1 year ago

0.3.35

1 year ago

0.3.34

1 year ago

0.3.33

1 year ago

0.3.32

1 year ago

0.3.29

1 year ago

24.7.6

12 months ago

24.9.3

10 months ago

24.7.5

1 year ago

24.9.2

10 months ago

24.7.4

1 year ago

24.9.1

11 months ago

24.7.3

1 year ago

24.7.2

1 year ago

24.7.1

1 year ago

24.6.7

1 year ago

24.6.6

1 year ago

24.8.3

11 months ago

24.6.5

1 year ago

24.6.4

1 year ago

24.6.9

1 year ago

24.6.8

1 year ago

24.8.1

11 months ago

24.6.3

1 year ago

24.6.2

1 year ago

24.6.1

1 year ago

0.3.28

1 year ago

0.3.27

1 year ago

0.3.26

1 year ago

0.3.25

1 year ago

0.3.24

1 year ago

0.3.23

1 year ago

0.3.22

1 year ago

0.3.21

1 year ago

0.3.20

1 year ago

0.3.19

1 year ago

0.3.18

1 year ago

0.3.17

1 year ago

0.3.16

1 year ago

0.3.14

1 year ago

0.3.13

1 year ago

0.3.12

1 year ago

0.3.11

1 year ago

0.3.10

1 year ago

0.3.9

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.2.1

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.4

1 year ago

0.2.0

1 year ago