1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

[analog_threshold] Make thresholds templatable (#8452)

This commit is contained in:
Clyde Stubbs
2025-04-17 11:19:12 +10:00
committed by GitHub
parent f10bc73d31
commit 2704db5eef
4 changed files with 34 additions and 17 deletions

View File

@@ -26,3 +26,17 @@ binary_sensor:
threshold: 100
filters:
- invert:
- platform: analog_threshold
name: Analog Threshold 3
sensor_id: template_sensor
threshold: !lambda return 100;
filters:
- invert:
- platform: analog_threshold
name: Analog Threshold 4
sensor_id: template_sensor
threshold:
upper: !lambda return 110;
lower: !lambda return 90;
filters:
- invert: