generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from TheRealFalseReality/test
Test
- Loading branch information
Showing
5 changed files
with
803 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,8 @@ ota: | |
|
||
wifi: | ||
ap: | ||
|
||
web_server: | ||
|
||
captive_portal: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
substitutions: | ||
# PMP circuit, who's address is 103 | ||
addPMP_default: "103" | ||
addPMP_alt1: "108" | ||
addPMP_alt2: "109" | ||
addPMP_alt3: "110" | ||
|
||
button: | ||
# Change I2C Address of EZO-PMP | ||
- platform: template | ||
name: "Pump(Blue) -> ${addPMP_default} - Change I2C Address" | ||
on_press: | ||
then: | ||
- ezo_pmp.change_i2c_address: | ||
id: ezo_pump | ||
address: ${addPMP_default} | ||
|
||
- platform: template | ||
name: "Pump(Red) -> ${addPMP_alt1} - Change I2C Address" | ||
on_press: | ||
then: | ||
- ezo_pmp.change_i2c_address: | ||
id: ezo_pump | ||
address: ${addPMP_alt1} | ||
|
||
- platform: template | ||
name: "Pump(Green) -> ${addPMP_alt2} - Change I2C Address" | ||
on_press: | ||
then: | ||
- ezo_pmp.change_i2c_address: | ||
id: ezo_pump | ||
address: ${addPMP_alt2} | ||
|
||
- platform: template | ||
name: "Pump(Orange) -> ${addPMP_alt3} - Change I2C Address" | ||
on_press: | ||
then: | ||
- ezo_pmp.change_i2c_address: | ||
id: ezo_pump | ||
address: ${addPMP_alt3} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
substitutions: | ||
# PMP circuit, who's address is 103 | ||
addPMP: "103" # White | ||
update_pmp: "60s" | ||
|
||
ezo_pmp: | ||
- id: ezo_pump | ||
address: ${addPMP} | ||
update_interval: "${update_pmp}" | ||
|
||
api: | ||
services: | ||
- service: pump_dose_volume | ||
variables: | ||
dose_volume: float | ||
then: | ||
- ezo_pmp.dose_volume: | ||
id: ezo_pump | ||
volume: !lambda 'return dose_volume;' | ||
- service: pump_dose_volume_time | ||
variables: | ||
dose_volume: float | ||
dose_time: float | ||
then: | ||
- ezo_pmp.dose_volume_over_time: | ||
id: ezo_pump | ||
volume: !lambda |- | ||
return dose_volume; | ||
duration: !lambda |- | ||
return dose_time; | ||
- service: pump_dose_flow_rate_time | ||
variables: | ||
dose_rate: float | ||
dose_time: float | ||
then: | ||
- ezo_pmp.dose_with_constant_flow_rate: | ||
id: ezo_pump | ||
volume_per_minute: !lambda |- | ||
return dose_rate; | ||
duration: !lambda |- | ||
return dose_time; | ||
- service: pump_dose_set_calibration | ||
variables: | ||
actual_volume: float | ||
then: | ||
- ezo_pmp.set_calibration_volume: | ||
id: ezo_pump | ||
volume: !lambda |- | ||
return actual_volume; | ||
- service: pump_change_address | ||
variables: | ||
address: int | ||
then: | ||
- ezo_pmp.change_i2c_address: | ||
id: ezo_pump | ||
address: !lambda |- | ||
return address; | ||
sensor: | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
current_volume_dosed: | ||
id: current_volume_dosed | ||
name: Pump - Current Volume Dosed | ||
icon: mdi:cube-scan | ||
device_class: 'volume' | ||
unit_of_measurement: 'mL' | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
total_volume_dosed: | ||
id: total_volume_dosed | ||
name: Pump - Total Volume Dosed | ||
icon: mdi:timer-sand-empty | ||
device_class: 'volume' | ||
unit_of_measurement: 'mL' | ||
disabled_by_default: true | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
absolute_total_volume_dosed: | ||
id: absolute_total_volume_dosed | ||
name: Pump - Absolute Total Volume Dosed | ||
icon: mdi:timer-sand-full | ||
device_class: 'volume' | ||
unit_of_measurement: 'mL' | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
last_volume_requested: | ||
id: last_volume_requested | ||
name: Pump - Last Volume Requested | ||
icon: mdi:history | ||
device_class: 'volume' | ||
unit_of_measurement: 'mL' | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
max_flow_rate: | ||
id: max_flow_rate | ||
name: Pump - Max Volume/Time Flow Rate | ||
icon: mdi:car-speed-limiter | ||
unit_of_measurement: 'mL/min' | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
pump_voltage: | ||
id: pump_voltage | ||
name: Pump - Voltage | ||
disabled_by_default: true | ||
device_class: 'voltage' | ||
|
||
binary_sensor: | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
pump_state: | ||
id: pump_state | ||
name: Pump - State | ||
icon: mdi:pump | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
is_paused: | ||
id: is_paused | ||
name: Pump - Paused Status | ||
disabled_by_default: true | ||
|
||
text_sensor: | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
dosing_mode: | ||
id: dosing_mode | ||
name: Pump - Dosing Mode | ||
icon: mdi:auto-mode | ||
- platform: ezo_pmp | ||
id: ezo_pump | ||
calibration_status: | ||
id: calibration_status | ||
name: Pump - Calibration Status | ||
# disabled_by_default: true | ||
icon: mdi:tape-measure | ||
|
||
number: | ||
- platform: template | ||
id: volume | ||
icon: mdi:pump | ||
name: Pump - Volume to Dose | ||
device_class: 'volume' | ||
unit_of_measurement: 'mL' | ||
optimistic: true | ||
initial_value: 10 # cannot be less than +/-0.1mL | ||
min_value: -378541 | ||
max_value: 378541 # 100 gal | ||
mode: box | ||
step: 0.1 | ||
- platform: template | ||
id: duration | ||
icon: mdi:timer | ||
name: Pump - Time to Dose | ||
device_class: 'duration' | ||
unit_of_measurement: 'min' | ||
optimistic: true | ||
initial_value: 1 | ||
min_value: 1 | ||
max_value: 1440 # 24 hours | ||
mode: box | ||
step: 0.1 | ||
- platform: template | ||
id: flow_rate | ||
icon: mdi:waves-arrow-right | ||
name: Pump - Volume/Time Flow Rate | ||
unit_of_measurement: 'mL/min' | ||
optimistic: true | ||
initial_value: 10 | ||
min_value: .5 | ||
max_value: 105 # may need to lower to 40 | ||
mode: box | ||
step: 0.1 | ||
|
||
button: | ||
# TODO Make UI | ||
- platform: template | ||
name: Pump - Dose Volume for Time | ||
icon: mdi:clock-time-two-outline | ||
id: dose_over_time | ||
on_press: | ||
- ezo_pmp.dose_volume_over_time: | ||
id: ezo_pump | ||
volume: !lambda |- | ||
return id(volume).state; | ||
duration: !lambda |- | ||
return id(duration).state; | ||
- platform: template | ||
name: Pump - Dose Continuously | ||
icon: mdi:infinity | ||
id: dose_continuously | ||
on_press: | ||
- ezo_pmp.dose_continuously: | ||
id: ezo_pump | ||
- platform: template | ||
name: Pump - Dose Volume | ||
icon: mdi:pump | ||
id: dose_volume | ||
on_press: | ||
- ezo_pmp.dose_volume: | ||
id: ezo_pump | ||
volume: !lambda |- | ||
return id(volume).state; | ||
- platform: template | ||
name: Pump - Dose at Volume/Time Flow Rate for Time | ||
icon: mdi:format-text-wrapping-overflow | ||
id: dose_flow_rate | ||
on_press: | ||
- ezo_pmp.dose_with_constant_flow_rate: | ||
id: ezo_pump | ||
volume_per_minute: !lambda |- | ||
return id(flow_rate).state; | ||
duration: !lambda |- | ||
return id(duration).state; | ||
- platform: template | ||
name: Pump - Pause Dosing | ||
icon: mdi:pause | ||
id: dose_pause | ||
on_press: | ||
- ezo_pmp.pause_dosing: | ||
id: ezo_pump | ||
- platform: template | ||
name: Pump - Stop Dosing | ||
icon: mdi:stop | ||
id: dose_stop | ||
on_press: | ||
- ezo_pmp.stop_dosing: | ||
id: ezo_pump | ||
- platform: template | ||
name: Pump - Clear Total Volume Dosed | ||
icon: mdi:backspace | ||
id: dose_clear | ||
on_press: | ||
- ezo_pmp.clear_total_volume_dosed: | ||
id: ezo_pump | ||
|
||
# Calibrate | ||
- platform: template | ||
name: Pump - Set Calibration Volume | ||
icon: mdi:tape-measure | ||
id: dose_calibrate_volume | ||
on_press: | ||
- ezo_pmp.set_calibration_volume: | ||
id: ezo_pump | ||
volume: !lambda |- | ||
return id(volume).state; | ||
- platform: template | ||
name: Pump - Clear Calibration Volume | ||
icon: mdi:cancel | ||
id: dose_calibrate_volume_clear | ||
on_press: | ||
- ezo_pmp.clear_calibration: | ||
id: ezo_pump |
Oops, something went wrong.