Skip to content

Commit a22a37e

Browse files
nuggetfabaff
authored andcommitted
Clarify docs for binary_sensor class 'opening' (home-assistant#2079)
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 parent 4c1c60d commit a22a37e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/_components/binary_sensor.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sharing: true
99
footer: true
1010
---
1111

12-
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/open/false** and **1/on/high/closed/true**.
12+
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**.
1313

1414
Knowing that there are only two states allows Home Assistant to represent the sensor better in the frontend.
1515

@@ -25,7 +25,7 @@ The display style of each entity can be modified in the [customize section](/get
2525
- **motion**: Motion sensor
2626
- **moving**: On means moving, Off means stopped
2727
- **occupancy**: On means occupied, Off means not occupied
28-
- **opening**: Door, window, etc
28+
- **opening**: Door, window, etc. On means open, Off means closed
2929
- **power**: Power, over-current, etc
3030
- **safety**: On means unsafe, Off means safe
3131
- **smoke**: Smoke detector

0 commit comments

Comments
 (0)