From 0ee7a0116c42fd63a113733f34bad3883e0bf93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Thu, 16 Oct 2025 19:25:30 +0200 Subject: [PATCH 1/3] Enhance analog_threshold.md with alternative example Added alternative usage example for binary sensor configuration. --- content/components/binary_sensor/analog_threshold.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content/components/binary_sensor/analog_threshold.md b/content/components/binary_sensor/analog_threshold.md index d526c2d6f1..4f6d786fbb 100644 --- a/content/components/binary_sensor/analog_threshold.md +++ b/content/components/binary_sensor/analog_threshold.md @@ -34,6 +34,18 @@ binary_sensor: threshold: 0.5 ``` +As an alternative to using this component you may use {{< docref "components/binary_sensor/template" >}} with [condition expressions](#config-condition): + +```yaml +# Example configuration entry +binary_sensor: + - platform: template + id: engine_running + condition: + sensor.in_range: + above: 300.0 +``` + ## Configuration variables - **sensor_id** (**Required**, [ID](#config-id)): The ID of the source sensor. From f8676ba65dc525e3ed4bc1c6c35b1c20c9b0bb29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Thu, 16 Oct 2025 19:37:35 +0200 Subject: [PATCH 2/3] Add name to binary sensor and fix sensor ID Updated the configuration for the binary sensor to include a name and corrected the condition sensor ID. --- content/components/binary_sensor/analog_threshold.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/components/binary_sensor/analog_threshold.md b/content/components/binary_sensor/analog_threshold.md index 4f6d786fbb..d73107cf5f 100644 --- a/content/components/binary_sensor/analog_threshold.md +++ b/content/components/binary_sensor/analog_threshold.md @@ -41,9 +41,10 @@ As an alternative to using this component you may use {{< docref "components/bin binary_sensor: - platform: template id: engine_running + name: "Engine Running" condition: sensor.in_range: - above: 300.0 + sensor_id: motor_current_sensor ``` ## Configuration variables From ea13a7c4ee9ae05015d6da6586293674ecacaa86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Thu, 16 Oct 2025 19:44:39 +0200 Subject: [PATCH 3/3] Update analog_threshold.md to include sensor condition --- content/components/binary_sensor/analog_threshold.md | 1 + 1 file changed, 1 insertion(+) diff --git a/content/components/binary_sensor/analog_threshold.md b/content/components/binary_sensor/analog_threshold.md index d73107cf5f..6ae8ea9f07 100644 --- a/content/components/binary_sensor/analog_threshold.md +++ b/content/components/binary_sensor/analog_threshold.md @@ -45,6 +45,7 @@ binary_sensor: condition: sensor.in_range: sensor_id: motor_current_sensor + above: 0.5 ``` ## Configuration variables