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 | The sensor is available and providing measurements. |
39
39
40
-
### Device classes
40
+
### Device Classes
41
41
42
42
The device class specifies the type of sensor. Default if not specified: `custom`.
43
43
@@ -51,6 +51,19 @@ The device class specifies the type of sensor. Default if not specified: `custom
51
51
| power | W | Power in watt or kilowatt |
52
52
| temperature | °C | Temperature with automatic °C, °F conversion, depending on remote settings. Use `native_unit` option if the temperature is measured in °F. |
53
53
| voltage | V | Voltage in volt |
54
+
| binary || Binary sensor. The binary specific device class is stored in the `unit` attribute. |
55
+
56
+
#### Binary Device Class
57
+
58
+
The `binary` device class allows specifying a binary sensor with two states in the `value` attribute: `on` and `off`.
59
+
60
+
These values can mean different things depending on the `unit` attribute. For example, a binary sensor with the `unit`
61
+
attribute set to `sound`: `on` means sound detected and `off` means no sound detected. For `unit` set to `window`: `on`
62
+
means the window is open and `off` means the window is closed.
63
+
64
+
If the `unit` attribute is not specified, the binary sensor is a generic on/off sensor.
65
+
66
+
🚧 Supported unit values are the Home Assistant binary sensor device classes: <https://www.home-assistant.io/integrations/binary_sensor/#device-class>
54
67
55
68
### Options
56
69
@@ -86,9 +99,9 @@ The following attributes are supported:
86
99
- Only sending the `unit` attribute is not valid.
87
100
- If the state is never sent, the sensor is considered available (`ON`).
88
101
89
-
### Event examples
102
+
### Event Examples
90
103
91
-
#### State change event
104
+
#### State Change Event
92
105
93
106
Sensor with a number value:
94
107
@@ -144,3 +157,22 @@ Sensor coming online with the current value:
0 commit comments