Adjusted battery level calibration

This commit is contained in:
2025-08-23 11:57:14 +02:00
parent 10666039b9
commit 07cca4a715

View File

@@ -91,7 +91,8 @@ binary_sensor:
- script.execute: game_play_section
sensor:
# Battery level sensor: 560 is 4.0v (battery flat), 740 is 5,2v (battery full)
# Battery level sensor: 500 is less than 4.0v (battery flat), 850 is 5,4v (battery full)
# Check with your batteries and change the values accordingly
- platform: adc
pin: A0
name: "Battery level"
@@ -101,11 +102,11 @@ sensor:
raw: true
filters:
- clamp:
min_value: 560.0
max_value: 740.0
min_value: 500.0
max_value: 850.0
- calibrate_linear:
- 560.0 -> 0.0
- 740.0 -> 100.0
- 500.0 -> 0.0
- 850.0 -> 100.0
- min:
send_first_at: 3