Binary Sensor
binary_sensor: - platform: ... # [!code highlight] name: 'My Binary Sensor' device_class: presenceAttributes
Section titled “Attributes”Common attributes are documented in Common Component Properties.
| Property | Description | Example |
|---|---|---|
device_class | Home Assistant binary sensor class (for example presence, motion, door). | presence |
on_press | Trigger block that runs when state changes to true. | then: - switch.turn_on: "screen" |
on_release | Trigger block that runs when state changes to false. | then: - switch.turn_off: "screen" |
Supported Filters
Section titled “Supported Filters”| Filter | Description |
|---|---|
invert | Inverts the boolean value (true <-> false). |
delayed_on | Delays propagation of true values by the configured duration. |
delayed_off | Delays propagation of false values by the configured duration. |
Supported Platforms
Section titled “Supported Platforms”| Platform | Notes |
|---|---|
| Shell | Reads boolean state from command output. |
| GPIO | Reads binary state from GPIO pin events. |
For platform-specific configuration options, use the linked platform pages.
Similar to ESPHome: Binary Sensor