1.2.0 • Published 1 year ago

homeassistant-rx v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

homeassistant-rx

reactive extension for homeassistant based on kefir-js.

usage

Install:

npm i --save homeassistant-rx

Example:

import homeassistantRx from 'homeassistant-rx.mjs';

const haRx = homeassistantRx({
    hostname: "192.168.0.101",
    accessToken: "your_token"
});

await haRx.connect()

const motionDetected = haRx.stateTriggers$({entityId: "binary_sensor.motion_entity_1", to: "on"})
const turnLighsOn = haRx.callService("light", "turn_on", {entity_id: light.light_entity_1})

motionDetected.onValue(turnLighsOn)
1.2.0

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago