mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-04 10:08:57 +00:00

The documentation for the 'opening' class of binary_sensor left the interpretation of On and Off undefined. Additionally, the intro paragraph claimed that "On" is "Closed" and "Off" is "Open" which is the opposite of common usage that I've seen in example configurations. This commit explicitly states that On==Open and Off=Closed and amends the examples in the leading paragraph. Confirmed in Gitter chat that this is appropriate: @balloob: "I would assume that “on” is open as it’s the special case. Assuming doors/windows etc are usually closed. With smoke, detecting smoke is the special case"
1.5 KiB
1.5 KiB
layout, title, description, date, sidebar, comments, sharing, footer
layout | title | description | date | sidebar | comments | sharing | footer |
---|---|---|---|---|---|---|---|
page | Binary Sensor | Instructions how to setup your binary sensors with Home Assistant. | 2015-11-20 14:00 | true | false | true | true |
Binary sensors are gathering information about state of switches, contacts, pins, and alike. The return value of those sensors is usually digital (1/0). This means that those sensors knows only two states: 0/off/low/closed/false and 1/on/high/open/true.
Knowing that there are only two states allows Home Assistant to represent the sensor better in the frontend.
The display style of each entity can be modified in the customize section. The following device classes are supported for binary sensors:
- None: Generic on/off
- cold: On means cold (or too cold)
- connectivity: On means connection present, Off means no connection
- gas: CO, CO2, etc
- heat: On means hot (or too hot)
- light: Lightness threshold
- moisture: Specifically a wetness sensor
- motion: Motion sensor
- moving: On means moving, Off means stopped
- occupancy: On means occupied, Off means not occupied
- opening: Door, window, etc. On means open, Off means closed
- power: Power, over-current, etc
- safety: On means unsafe, Off means safe
- smoke: Smoke detector
- sound: On means sound detected, Off means no sound
- vibration: On means vibration detected, Off means no vibration
For analog sensors please check the component overview.