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.
* Changes to be committed: modified: aquapi_config.yaml modified: common/device_base.yaml new file: common/dht.yaml modified: common/ezo_pmp_duo.yaml new file: common/ir_receiver.yaml * Changes to be committed: modified: common/ezo_commands.yaml * blueprints updated
- Loading branch information
1 parent
978a43a
commit f4fad2a
Showing
12 changed files
with
274 additions
and
65 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
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
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
163 changes: 163 additions & 0 deletions
163
blueprints/script/TheRealFalseReality/aquapi_water_change_script - Copy.yaml
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,163 @@ | ||
blueprint: | ||
name: 'Aquarium - AquaPi: Water Change [Script]' | ||
description: 'Turn on two AquaPi EZO Pumps to simultaneously remove waste water | ||
(Red) and add clean water (Green) daily, in gallons. | ||
**Note, this script will fail if the calculated flow rate exceeds either of the | ||
EZO Pump''s Max Volume/Time Flow Rates.** [More Info]() (v1.0.1) [Script]' | ||
domain: script | ||
source_url: https://github.com/TheRealFalseReality/aquapi/blob/main/blueprints/script/TheRealFalseReality/aquapi_water_change_script.yaml | ||
input: | ||
condition: | ||
name: Add Condition(s) | ||
description: Add conditions if needed. | ||
default: [] | ||
selector: | ||
condition: {} | ||
aquarium_name: | ||
name: Aquarium Name | ||
description: Name of the Aquarium for the water change (Marine Aquarium). | ||
selector: | ||
text: | ||
multiple: false | ||
multiline: false | ||
pump_button: | ||
name: AquaPi Dose Pump for Water Change | ||
description: Select the **Dose Volume for Time** button. | ||
selector: | ||
target: | ||
entity: | ||
- domain: | ||
- button | ||
integration: esphome | ||
pump_volume: | ||
name: AquaPi Dose Pump Volume Input for Water Change | ||
description: Select the **Volume to Dose** input number entity. | ||
selector: | ||
target: | ||
entity: | ||
- domain: | ||
- number | ||
integration: esphome | ||
pump_time: | ||
name: AquaPi Dose Pump Time Input for Water Change | ||
description: Select the **Time to Dose** input number entity. | ||
selector: | ||
target: | ||
entity: | ||
- domain: | ||
- number | ||
integration: esphome | ||
change_volume_monthly: | ||
name: Water Change Volume Montly | ||
description: "Volume to change every month. Max: 100 gallons.\n Recommended | ||
10 - 15% monthly water change.\n ***Example: 120 gallon aquarium at 10% water | ||
change every month. 120gal x 0.10 = 12gal a month.***" | ||
selector: | ||
number: | ||
min: 0.1 | ||
max: 100.0 | ||
step: 0.1 | ||
unit_of_measurement: gal | ||
mode: box | ||
change_time: | ||
name: Water Change Over Time | ||
description: Change the water amount over this time in hours every day. | ||
default: 8 | ||
selector: | ||
number: | ||
min: 0.5 | ||
max: 23.0 | ||
step: 0.5 | ||
unit_of_measurement: hours | ||
mode: slider | ||
notify: | ||
name: Persistent Notification | ||
description: Notify Home Assistant when script is executed. | ||
default: true | ||
selector: | ||
boolean: {} | ||
additional_actions: | ||
name: Additional Actions | ||
description: "Add additional actions to the script. Will execute before everything | ||
else.\n- Example: To send to Mobile Device using the official Home Assistant | ||
App:\n\n Notifications -> Send a notification via mobile.YOUR_DEVICE_NAME\n | ||
\ ```\n service: notify.YOUR_DEVICE_NAME\n metadata: {}\n data:\n message: | ||
\"{{ message }}\"\n title: \"{{ title }}\"\n ```\n\n Copy {{ message | ||
}} into `message`. This will switch to \"yaml\" mode. Above is a completed | ||
example.\n" | ||
default: [] | ||
selector: | ||
action: {} | ||
variables: | ||
condition: !input condition | ||
pump_button: !input pump_button | ||
pump_volume: !input pump_volume | ||
pump_time: !input pump_time | ||
change_time: !input change_time | ||
change_volume_monthly: !input change_volume_monthly | ||
change_volume: '{{ (change_volume_monthly * 3) / 91 }}' | ||
aquarium_name: !input aquarium_name | ||
additional_actions: !input additional_actions | ||
notify: !input notify | ||
calculated_time: '{{ change_time * 60 }}' | ||
calculated_volume: '{{ change_volume * 3785.41 }}' | ||
calculated_flow_rate: '{{ change_volume / change_time }}' | ||
calculated_flow_rate_metric: '{{ calculated_volume / calculated_time }}' | ||
title: '{{ aquarium_name }} Water Change' | ||
message: 'Changing {{ change_volume | float | round(2, default=2) }} gal of {{ aquarium_name | ||
}} water for {{ change_time }} hours at {{ calculated_flow_rate | float | round(2, | ||
default=2) }} gal/hr ({{ calculated_flow_rate_metric | float | round(2, default=2)}} | ||
mL/min). Monthly Water Change Amount: {{ change_volume_monthly }} gallons.' | ||
title_fail: '{{ aquarium_name }} Water Change Failed' | ||
message_fail: "Failed to dose {{ aquarium_name }} due to conditions not passing.\n | ||
Conditions: {{ condition }}" | ||
title_fail_rate: '{{ aquarium_name }} Water Change Failed' | ||
message_fail_rate: The measured flow rate of {{ calculated_flow_rate_metric | float | ||
| round(2, default=2)}} mL/min exceeds the typical rate of 50 mL/min. To ensure | ||
accuracy, the automation process may be halted. | ||
sequence: | ||
- if: | ||
- condition: !input condition | ||
then: | ||
- choose: [] | ||
default: !input additional_actions | ||
- service: number.set_value | ||
target: !input pump_volume | ||
data: | ||
value: '{{ calculated_volume }}' | ||
- service: number.set_value | ||
target: !input pump_time | ||
data: | ||
value: '{{ calculated_time }}' | ||
- delay: | ||
hours: 0 | ||
minutes: 0 | ||
seconds: 0 | ||
milliseconds: 100 | ||
- service: button.press | ||
metadata: {} | ||
data: {} | ||
target: !input pump_button | ||
- if: | ||
- condition: template | ||
value_template: '{{ notify }}' | ||
then: | ||
- service: notify.persistent_notification | ||
data: | ||
message: '{{ message }}' | ||
title: '{{ title }}' | ||
- if: | ||
- condition: template | ||
value_template: '{{ calculated_flow_rate_metric > 50 }}' | ||
then: | ||
- service: notify.persistent_notification | ||
data: | ||
message: '{{ message_fail_rate }}' | ||
title: '{{ title_fail_rate }}' | ||
else: | ||
- service: notify.persistent_notification | ||
data: | ||
message: '{{ message_fail }}' | ||
title: '{{ title_fail }}' | ||
mode: single |
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
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,31 @@ | ||
substitutions: | ||
dhtPin: "25" | ||
update_dht: "60s" | ||
|
||
sensor: | ||
# DHT | ||
- platform: dht | ||
pin: ${dhtPin} | ||
# model: DHT11 | ||
temperature: | ||
name: "Air Temperature" | ||
id: air_temperature | ||
humidity: | ||
name: "Humidity" | ||
id: relative_humidity | ||
update_interval: "${update_dht}" | ||
|
||
- platform: absolute_humidity | ||
name: Absolute Humidity | ||
temperature: air_temperature | ||
humidity: relative_humidity | ||
|
||
- platform: template | ||
name: Dew Point | ||
id: dew_point | ||
icon: mdi:thermometer-water | ||
state_class: "measurement" | ||
device_class: "temperature" | ||
unit_of_measurement: "°C" | ||
lambda: |- | ||
return ( id(air_temperature).state - (( 100 - id(relative_humidity).state ) / 5 ) ); |
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
Oops, something went wrong.