Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions content/components/binary_sensor/analog_threshold.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The anchor link #config-condition appears to be invalid as there is no corresponding section with that ID in this document. Either remove the anchor or link to the correct documentation page where condition expressions are explained.

Suggested change
As an alternative to using this component you may use {{< docref "components/binary_sensor/template" >}} with [condition expressions](#config-condition):
As an alternative to using this component you may use {{< docref "components/binary_sensor/template" >}} with [condition expressions](https://esphome.io/components/binary_sensor/template.html#condition):

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it and it still works. This way of referencing this document is used in many places.


```yaml
# Example configuration entry
binary_sensor:
- platform: template
id: engine_running
condition:
sensor.in_range:
Comment on lines 43 to 46
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The alternative example is incomplete and may confuse users. It's missing the required sensor_id parameter for the sensor.in_range condition to specify which sensor to monitor. Consider adding this parameter and optionally the name field to make the example more complete and parallel to the original example above.

Suggested change
id: engine_running
condition:
sensor.in_range:
id: engine_running
name: "Engine Running"
condition:
sensor.in_range:
sensor_id: motor_current_sensor

Copilot uses AI. Check for mistakes.
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed: f8676ba

above: 300.0
```

## Configuration variables

- **sensor_id** (**Required**, [ID](#config-id)): The ID of the source sensor.
Expand Down