28 lines
617 B
YAML
28 lines
617 B
YAML
---
|
|
|
|
sensor:
|
|
- pin: ${potentiometer_pin}
|
|
#disabled_by_default: true
|
|
name: ${potentiometer_name}
|
|
platform: adc
|
|
update_interval: 0.05s
|
|
attenuation: "auto"
|
|
device_class: "power_factor"
|
|
unit_of_measurement: "%"
|
|
accuracy_decimals: 0
|
|
filters:
|
|
- delta: 0.01
|
|
#- lambda: !lambda |-
|
|
# return x-0.033;
|
|
- lambda: !lambda |-
|
|
return (x*100)/2.60;
|
|
- lambda: !lambda |-
|
|
if (x < 1) return 0;
|
|
if (x > 100) return 100;
|
|
return int(x);
|
|
- delta: 1.0
|
|
#- debounce: 1s
|
|
#- throttle: 5s
|
|
#- heartbeat: 3600s
|
|
|