Giter Site home page Giter Site logo

habpanel-widget-xiaomi-sensor_magnet's Introduction

Habpanel / Xiaomi Door Window sensor

Widget designed for 1x1 habpanel dashboard grid
Note: Use 100% of browser zoom




things/*.things file:
Thing mihome:sensor_magnet:YOUR ID "Xiaomi Door Sensor" [itemId="YOUR ID"]

items/*.items file:
// Xiaomi Window Switch
Contact WindowSwitch_Status "Window State"   { channel="mihome:sensor_magnet:YOUR ID:isOpen" }
Number WindowSwitch_AlarmTimer "Window Alarm Timer"  { channel="mihome:sensor_magnet:YOUR ID:isOpenAlarmTimer" }
DateTime WindowSwitch_LastOpened "Window Last Opened [%1$tY-%1$tm-%1$td  %1$tH:%1$tM]"  { channel="mihome:sensor_magnet:YOUR ID:lastOpened" }
Number WindowSwitch_Battery "Window Battery"  { channel="mihome:sensor_magnet:YOUR ID:batteryLevel" }
Switch WindowSwitch_BatteryLow "Window Battery Low"  { channel="mihome:sensor_magnet:YOUR ID:lowBattery" }

sitemaps/*.sitemap file:
Switch item=WindowSwitch_Status label="Window status" mappings=[OPEN="Opened"] visibility=[WindowSwitch_Status==OPEN]
Switch item=WindowSwitch_Status label="Window status" mappings=[CLOSED="Closed"] visibility=[WindowSwitch_Status==CLOSED]
Text item=WindowSwitch_LastOpened label="Opened timed" visibility=[WindowSwitch_Status==OPEN]
Text item=WindowSwitch_LastOpened label="Closed time" visibility=[WindowSwitch_Status==CLOSED]

persistence/mysql.persist file:
WindowSwitch_Status : strategy = everyChange, everyDay, restoreOnStartup
WindowSwitch_Battery : strategy = everyChange, everyDay, restoreOnStartup

habpanel-widget-xiaomi-sensor_magnet's People

Contributors

andreypopov avatar

Watchers

 avatar  avatar  avatar

Forkers

thkls

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.