Socket
Book a DemoInstallSign in
Socket

hassdb

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hassdb

Simple and minimal data storage for Home Assistant

1.0.2
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

hassdb

hassdb is a simple and minimal approach to persistent storage in Home Assistant.

  • Installation
  • Usage
  • Examples
  • Contribution Guidelines

Installation

To install hassdb, simply run:

npm install -g hassdb

If you receive a permissions error, try it again with sudo:

sudo npm install -g hassdb

Usage

To store a value:

hassdb 'key' 'value'

To read a value:

hassdb 'key'

Examples

Store with Home Assistant

Add this to your Home Assistant configuration.yaml:

shell_command:
  hassdb_set: 'hassdb "{{ key }}" "{{ value }}"'

automation:
  trigger:
    ...
  action:
    - service: shell_command.hassdb_set
      data_template:
        key: light.living_room.state
        value: "{{ states.light.living_room.state }}"
    - service: shell_command.hassdb_set
      data_template:
        key: light.living_room.attributes
        value: "{{ states.light.living_room.attributes }}"

Contribution Guidelines

Feel free to put up a pull request to fix a bug or maybe add a feature. I will give it a code review and make sure that it does not break backwards compatibility. If I or any other collaborators agree that it is in line with the vision of the project, we will work with you to get the code into a mergeable state and merge it into the master branch.

Keywords

home-assistant

FAQs

Package last updated on 23 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.