Skip to content

Binary Sensor

Base Example
binary_sensor:
- platform: ... # See supported platforms at the end of this page
name: 'My Binary Sensor'
device_class: presence

Common attributes are documented in Common Component Properties.

PropertyDescriptionExample
device_classHome Assistant binary sensor class (for example presence, motion, door).presence

Trigger can issue actions. Additionally they can be filtered.

PropertyDescriptionExample
on_pressTrigger block that runs when state changes to true.then: - switch.turn_on: "screen"
on_releaseTrigger block that runs when state changes to false.then: - switch.turn_off: "screen"

Similar to ESPHome: Binary Sensor