From 2d3519972c3366dbde44c228c1058fe068585296 Mon Sep 17 00:00:00 2001 From: Don Burch <60803198+donburch888@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:55:59 +1000 Subject: [PATCH 1/2] Update _index.md for Binary Sensor Separate those conditions & actions which USE a Binary Sensor from those which DEFINE a Binary Sensor ... per Feature Request #3280 --- content/components/binary_sensor/_index.md | 36 ++++++++++++---------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/content/components/binary_sensor/_index.md b/content/components/binary_sensor/_index.md index 9220eca253..803636a284 100644 --- a/content/components/binary_sensor/_index.md +++ b/content/components/binary_sensor/_index.md @@ -90,22 +90,6 @@ Advanced options: - If MQTT enabled, all other options from [MQTT Component](#config-mqtt-component). - If Webserver enabled and version 3 is selected, All other options from Webserver Component.. See [Webserver Version 3](#config-webserver-version-3-options). -## Actions - -{{< anchor "binary_sensor-invalidate_state-action" >}} - -### `binary_sensor.invalidate_state` Action - -This action will invalidate the current state of the sensor. It is most useful with the Template binary sensor. -After the state is invalidated, it will be reported to Home Assistant as `unknown`. Example: - -```yaml -on_...: - binary_sensor.invalidate_state: my_binary_sensor_id -``` - -The state may also be invalidated by an API call in a lambda - see the API reference linked below. - {{< anchor "binary_sensor-filters" >}} ## Binary Sensor Filters @@ -472,6 +456,26 @@ on_multi_click: {{< anchor "binary_sensor-is_on_condition" >}} {{< anchor "binary_sensor-is_off_condition" >}} + + + + +## Referencing Binary Sensor + +{{< anchor "binary_sensor-invalidate_state-action" >}} + +### `binary_sensor.invalidate_state` Action + +This action will invalidate the current state of the sensor. It is most useful with the Template binary sensor. +After the state is invalidated, it will be reported to Home Assistant as `unknown`. Example: + +```yaml +on_...: + binary_sensor.invalidate_state: my_binary_sensor_id +``` + +The state may also be invalidated by an API call in a lambda - see the API reference linked below. + ### `binary_sensor.is_on` / `binary_sensor.is_off` Condition This [Condition](#config-condition) checks if the given binary sensor is ON (or OFF). From 03189e3442db0509114110d548979dbc7441bde1 Mon Sep 17 00:00:00 2001 From: Don Burch <60803198+donburch888@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:51:05 +1000 Subject: [PATCH 2/2] Update _index.md of Binary Sensor minor formatting tidy-ups. --- content/components/binary_sensor/_index.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/content/components/binary_sensor/_index.md b/content/components/binary_sensor/_index.md index 803636a284..fdb97e978a 100644 --- a/content/components/binary_sensor/_index.md +++ b/content/components/binary_sensor/_index.md @@ -79,7 +79,7 @@ Advanced options: - **trigger_on_initial_state** (*Optional*, boolean): If true, any applicable triggers will be fired when the binary sensor state changes from `unknown` to a valid state. This applies to the first valid state set, and any valid state set after - a `binary_sensor.invalidate_state` action has been excuted. The default is `false`. + a `binary_sensor.invalidate_state` action has been executed. The default is `false`. **publish_initial_state** (*Optional*, boolean): A deprecated equivalent to `trigger_on_initial_state`. - **entity_category** (*Optional*, string): The category of the entity. @@ -88,7 +88,7 @@ Advanced options: Set to `""` to remove the default entity category. - If MQTT enabled, all other options from [MQTT Component](#config-mqtt-component). -- If Webserver enabled and version 3 is selected, All other options from Webserver Component.. See [Webserver Version 3](#config-webserver-version-3-options). +- If Webserver enabled and version 3 is selected, All other options from Webserver Component. See [Webserver Version 3](#config-webserver-version-3-options). {{< anchor "binary_sensor-filters" >}} @@ -453,14 +453,7 @@ on_multi_click: - logger.log: "Single Short Clicked" ``` -{{< anchor "binary_sensor-is_on_condition" >}} -{{< anchor "binary_sensor-is_off_condition" >}} - - - - - -## Referencing Binary Sensor +## Referencing Binary Sensors {{< anchor "binary_sensor-invalidate_state-action" >}} @@ -476,6 +469,9 @@ on_...: The state may also be invalidated by an API call in a lambda - see the API reference linked below. +{{< anchor "binary_sensor-is_on_condition" >}} +{{< anchor "binary_sensor-is_off_condition" >}} + ### `binary_sensor.is_on` / `binary_sensor.is_off` Condition This [Condition](#config-condition) checks if the given binary sensor is ON (or OFF).