Skip to main content

Binary Sensor Entity

A binary sensor is a sensor that can only have two states. Derive entity platforms from homeassistant.components.binary_sensor.BinarySensorEntity

Properties

tip

Properties should always only return information from memory and not do I/O (like network requests). Implement update() or async_update() to fetch data.

NameTypeDefaultDescription
is_onbooleanNoneRequired. If the binary sensor is currently on or off.
device_classstringNoneType of binary sensor.

Available device classes

ValueDescription
batteryOn means low, Off means normal.
battery_chargingOn means charging, Off means not charging.
coOn means carbon monoxide detected, Off means no carbon monoxide (clear).
coldOn means cold, Off means normal.
connectivityOn means connected, Off means disconnected.
doorOn means open, Off means closed.
garage_doorOn means open, Off means closed.
gasOn means gas detected, Off means no gas (clear).
heatOn means hot, Off means normal.
lightOn means light detected, Off means no light.
lockOn means open (unlocked), Off means closed (locked).
moistureOn means wet, Off means dry.
motionOn means motion detected, Off means no motion (clear).
movingOn means moving, Off means not moving (stopped).
occupancyOn means occupied, Off means not occupied (clear).
openingOn means open, Off means closed.
plugOn means plugged in, Off means unplugged.
powerOn means power detected, Off means no power.
presenceOn means home, Off means away.
problemOn means problem detected, Off means no problem (OK).
runningOn means running, Off means not running.
safetyOn means unsafe, Off means safe.
smokeOn means smoke detected, Off means no smoke (clear).
soundOn means sound detected, Off means no sound (clear).
tamperOn means tampering detected, Off means no tampering (clear)
updateOn means update available, Off means up-to-date. The use of this device class should be avoided, please consider using the update entity instead.
vibrationOn means vibration detected, Off means no vibration.
windowOn means open, Off means closed.