You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a Bluetooth LE device, this advertises temperature and battery in a [BTHome (https://bthome.io/)](https://bthome.io/) compatible format, which can then be used in https://www.home-assistant.io/
4
+
5
+
If you attach a Puck.js running this code near a door, and then put a magnet on the door such that it's near the Puck when the door is closed, this will fire a `long_press` button event to Home Assistant and flash the red LED
6
+
when the door is opened, and a `press` event (and green flash) when it is closed.
7
+
8
+
This is based on https://www.espruino.com/BTHome and https://www.espruino.com/Puck.js+Door+Light
9
+
10
+
11
+
## Usage
12
+
13
+
Install the app and disconnect, then place the Puck.js running this code near a door (on the door frame), and then put a magnet on the door such that it's near the Puck when the door is closed
0 commit comments