diff --git a/source/_integrations/binary_sensor.markdown b/source/_integrations/binary_sensor.markdown index c47e39903b8..ecc25da24fd 100644 --- a/source/_integrations/binary_sensor.markdown +++ b/source/_integrations/binary_sensor.markdown @@ -8,11 +8,40 @@ ha_quality_scale: internal ha_domain: binary_sensor --- -Binary sensors gather information about the state of devices which have a "digital" return value (either 1 or 0). These can be switches, contacts, pins, etc. These sensors only have 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 these sensors in a better way in the frontend according to their functionality. +Binary sensors are similar to other [sensors](/integrations/sensor) in that they +monitor the states and conditions of different entities. Where binary sensors +differ is they can only return one of two mutually exclusive values. +For example, a binary sensor for a window may report a value +of `open` or `closed`, a switch `on` or `off`, a condition `true` or `false`. + +This *either/or* constraint is what makes these sensors binary. They are digital +in nature, whereas analog sensors, like temperature and weight sensors, +return a range of values. + +Some binary sensors are created automatically when you add a device integration. +For example, adding the [ecobee integration](/integrations/ecobee/) will create +a binary sensor to detect room occupancy. Other binary sensors can be created +manually using the [template integration](/integrations/template/) +or using an [input boolean helper](/integrations/input_boolean), ### Device Class -The way these sensors are displayed in the frontend can be modified in the [customize section](/getting-started/customizing-devices/). The following device classes are supported for binary sensors: +Knowing a sensor is binary impacts how the sensor's current state may be +represented in Home Assistant's UI (see [Lovelace](/lovelace/)). Opposing states +may be given different icons, colors, and value labels to highlight a particular +state over the other. This is set by the binary sensor's device class. + +Here are a few examples of this representation in the UI: + +
+
+Example of various device classes icons in `on` and `off` state. The on image
+in this example has `state_color: true` specified in the Entities card
+configuration to receive the icon coloring.
+
-
-Example of various device classes icons in `on` and `off` state. The on image in this example has `state_color: true` specified in the Entities card configuration to receive the icon coloring.
-