Added all the changes necessary to run chlorine pump again

This commit is contained in:
2024-05-24 16:00:34 +02:00
parent cb6a250d29
commit fd6d54697c
3 changed files with 54 additions and 37 deletions

View File

@@ -2,11 +2,11 @@ esphome:
name: chlorine-pump
project:
name: nbsgamesat.chlorine-pump
version: "0.2"
version: "0.7"
on_boot:
priority: 600
then:
output.turn_on: whatever
output.turn_on: wifi_status_led
esp8266:
board: nodemcuv2
@@ -21,7 +21,7 @@ external_components:
- source:
type: local
path: external_components/
components: [ analog_orp, chlorine_pump ]
components: [ chlorine_pump ]
globals:
- id: last_pump_state
@@ -40,7 +40,9 @@ wifi:
password: !secret wifi_password
fast_connect: true
on_connect:
output.turn_off: whatever
output.turn_off: wifi_status_led
on_disconnect:
output.turn_on: wifi_status_led
output:
- platform: gpio
@@ -50,7 +52,7 @@ output:
pin:
number: D0
inverted: true
id: whatever
id: wifi_status_led
binary_sensor:
- platform: gpio
@@ -137,20 +139,22 @@ text_sensor:
id: cycle_text_info
sensor:
- platform: analog_orp
- platform: adc
name: Chlorine
id: chlorine_sensor
unit_of_measurement: "mV"
icon: "mdi:test-tube"
pin: A0
zero_point: 673
inverted: true
update_interval: 1s
# print_raw: true
average:
mesurements: 15
send_state_every: 10
# on_value_read:
# - lambda: |-
# ESP_LOGD("WHAT", "Chlorine_value, %.1f", x);
update_interval: 200ms
filters:
- multiply: 3.3
- offset: -1.5
- multiply: 1000.0
- median:
window_size: 25
send_every: 25
send_first_at: 25
- offset: 30.0
- platform: hx711
name: "Chlorine Canister Levels"
dout_pin: D5
@@ -163,13 +167,19 @@ sensor:
- 47608 -> 0
- 590566 -> 100
unit_of_measurement: "%"
- platform: template
name: debug_last_raw_value
id: debug_last_raw_value
accuracy_decimals: 0
unit_of_measurement: "points"
chlorine_pump:
pump: pump_switch
sensor: chlorine_sensor
id: chlorine_pump_component
target: 700
disable_clock: true
disable_clock: false
proportional_band: 400
on_pump_value:
- lambda: |-
if(pState != id(last_pump_state)){