From af7bfb272746836f1f7613139233e88abc4cc300 Mon Sep 17 00:00:00 2001 From: Bram Kelchtermans Date: Mon, 21 Oct 2024 18:46:30 +0200 Subject: [PATCH] bed scale recalibrate --- ESPhome/bed-scale/bed_scale.yaml | 16 ++++++++-------- ESPhome/bed-scale/raw_output.yaml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ESPhome/bed-scale/bed_scale.yaml b/ESPhome/bed-scale/bed_scale.yaml index 196089d..e52478a 100644 --- a/ESPhome/bed-scale/bed_scale.yaml +++ b/ESPhome/bed-scale/bed_scale.yaml @@ -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;' - - delta: 0.5 \ No newline at end of file + - lambda: "return x - id(constant_weight);" + - lambda: "return x >= 10.0 ? x : 0;" + - delta: 0.5 diff --git a/ESPhome/bed-scale/raw_output.yaml b/ESPhome/bed-scale/raw_output.yaml index 977964f..c9b4c3e 100644 --- a/ESPhome/bed-scale/raw_output.yaml +++ b/ESPhome/bed-scale/raw_output.yaml @@ -13,6 +13,7 @@ api: password: "" ota: + platform: esphome password: "" wifi: @@ -33,4 +34,3 @@ sensor: clk_pin: D3 gain: 128 update_interval: 3s - \ No newline at end of file