ds82 / openhab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@ds82/openhab

npm (scoped) npm (scoped with tag)

This is a helper library with the goal to extend and improve the default openhab3 javascript rule syntax.

Install

Switch to the conf/automation/js/ folder of openhab3 and install this library using npm:

npm install @ds82/openhab@beta

Usage

After successful installation you can start writing rules using this library.

// js/test.js

const { addRule, timeTrigger, forceOn } = require('@ds82/openhab');

addRule(
  'Dim lights at 19.30',
  function () {
    forceOn('Upstairs_Floor_Nightmode');
  },
  [timeTrigger('0 30 19 ? * *')]
);

Documentation

Find the documentation of this library at https://ds82.github.io/openhab/index.html

About

License:MIT License


Languages

Language:TypeScript 67.8%Language:JavaScript 32.2%