Adjusted battery level calibration
This commit is contained in:
11
hexagon.yaml
11
hexagon.yaml
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user