Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GrowSmart - ESPHome
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Grewe
GrowSmart - ESPHome
Commits
9b2d49b1
Commit
9b2d49b1
authored
3 years ago
by
Jan Grewe
Browse files
Options
Downloads
Patches
Plain Diff
replace BLE with BME280
add temperature/humidity hysteresis add Dallas DS18B20 for water temperature
parent
84ea61af
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
propbox.yaml
+33
-18
33 additions, 18 deletions
propbox.yaml
with
33 additions
and
18 deletions
propbox.yaml
+
33
−
18
View file @
9b2d49b1
...
...
@@ -9,9 +9,6 @@ substitutions:
hostname_light
:
"
propbox-light.${domain}"
hostname_fan
:
"
propbox-fan.${domain}"
# Sensors
ble_sensor_mac
:
"
A4:C1:38:47:14:50"
# 'PropBoxBLE'
# Schedules
#schedule_grow_on: "0 0 3 * * *"
#schedule_grow_off: "0 0 21 * * *"
...
...
@@ -24,15 +21,23 @@ substitutions:
temperature_max
:
"
27"
temperature_min
:
"
21"
temperature_hysteresis
:
"
2"
humidity_max
:
"
70"
humidity_min
:
"
40"
humidity_hysteresis
:
"
5"
<<
:
!include
common.yaml
esp32
:
board
:
esp32dev
esp32_ble_tracker
:
i2c
:
sda
:
21
scl
:
22
dallas
:
-
pin
:
GPIO23
update_interval
:
5s
http_request
:
id
:
http_request_data
...
...
@@ -52,26 +57,33 @@ sensor:
### Specific Sensors
-
platform
:
pvvx_mithermometer
mac_address
:
${ble_sensor_mac}
battery_level
:
id
:
ble_battery_level
name
:
"
BLE
Battery
Level"
battery_voltage
:
id
:
ble_battery_voltage
name
:
"
BLE
Battery
Voltage"
-
platform
:
bme280
address
:
0x76
update_interval
:
5s
temperature
:
id
:
ble_
temperature
id
:
temperature
name
:
"
Temperature"
accuracy_decimals
:
2
on_value
:
then
:
-
script.execute
:
fan_control
humidity
:
id
:
ble_
humidity
id
:
humidity
name
:
"
Humidity"
accuracy_decimals
:
2
on_value
:
then
:
-
script.execute
:
fan_control
pressure
:
id
:
pressure
accuracy_decimals
:
2
name
:
"
Pressure"
-
platform
:
dallas
index
:
0
id
:
temperature_water
name
:
"
Water
Temperature"
accuracy_decimals
:
2
text_sensor
:
!include
include/text_sensors.yaml
...
...
@@ -99,6 +111,8 @@ select:
id(schedule) = index.value();
switch
:
-
platform
:
restart
name
:
"
Restart"
-
platform
:
template
id
:
propbox_light
name
:
"
Light
Status"
...
...
@@ -170,17 +184,18 @@ script:
// switch fan on when temperature/humidity is above the limit, unless humidity/temperature is below the limit
if (
!id(propbox_fan).state &&
(id(
ble_
temperature).state >= ${temperature_max} && id(
ble_
humidity).state >= ${humidity_min}) ||
(id(
ble_
humidity).state >= ${humidity_max} && id(
ble_
temperature).state >= ${temperature_min})
(id(temperature).state >= ${temperature_max} && id(humidity).state >= ${humidity_min}) ||
(id(humidity).state >= ${humidity_max} && id(temperature).state >= ${temperature_min})
) {
id(propbox_fan).turn_on();
id(propbox_fan).publish_state(true);
}
// switch fan off when temperature and humidity are below the limits
// switch fan off when temperature and humidity are below the limits
minus hysteresis
else if (
id(propbox_fan).state &&
id(ble_temperature).state <= ${temperature_max} && id(ble_humidity).state <= ${humidity_max}
id(temperature).state <= ${temperature_max} - ${temperature_hysteresis} &&
id(humidity).state <= ${humidity_max} - ${humidity_hysteresis}
) {
id(propbox_fan).turn_off();
id(propbox_fan).publish_state(false);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment