bed scale recalibrate

This commit is contained in:
2024-10-21 18:46:30 +02:00
parent fb908f9d50
commit af7bfb2727
2 changed files with 9 additions and 9 deletions
+7 -7
View File
@@ -13,6 +13,7 @@ api:
password: ""
ota:
platform: esphome
password: ""
wifi:
@@ -26,7 +27,6 @@ wifi:
captive_portal:
globals:
- id: constant_weight
type: float
@@ -41,8 +41,8 @@ sensor:
gain: 128
filters:
- calibrate_linear:
- 2827100 -> 0
- 5170670 -> 103.9
- 1827200 -> 0
- 3218000 -> 105
on_value:
- if:
condition:
@@ -52,15 +52,15 @@ sensor:
last = x;
return x < 10.0 && diff < 1.0 && diff > - 1.0;
then:
- lambda: 'id(constant_weight) = x;'
- lambda: "id(constant_weight) = x;"
- platform: template
name: Bedscale
icon: mdi:weight-kilogram
update_interval: 3s
unit_of_measurement: kg
lambda: 'return id(bed).state;'
lambda: "return id(bed).state;"
filters:
- lambda: 'return x - id(constant_weight);'
- lambda: 'return x >= 10.0 ? x : 0;'
- lambda: "return x - id(constant_weight);"
- lambda: "return x >= 10.0 ? x : 0;"
- delta: 0.5
+1 -1
View File
@@ -13,6 +13,7 @@ api:
password: ""
ota:
platform: esphome
password: ""
wifi:
@@ -33,4 +34,3 @@ sensor:
clk_pin: D3
gain: 128
update_interval: 3s