Hello, I have an hx711 sensor running in ESPHome, and it works quite well so far. but I definitely need a tare function with a button. I just can not manage it…
I need a button like the one in the picture, it should set the value below to zero.
This is the code:
esphome:
name: waage-1-hx711
friendly_name: Waage 1 hx711
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "XXXXXXX"
ota:
password: "XXXXXXX"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Waage-1-Hx711 Fallback Hotspot"
password: "XXXXXXXX"
# Example configuration entry
sensor:
- platform: wifi_signal
name: "Pot Waage WiFi Signal"
update_interval: 60s
- platform: hx711
name: "HX711 Value"
dout_pin: 12
clk_pin: 13
gain: 128
update_interval: 2s
unit_of_measurement: kg
accuracy_decimals: 1
filters:
- calibrate_linear:
- 144614 -> 0
- 1004000 -> 1