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
a30a87d9
Commit
a30a87d9
authored
May 28, 2022
by
Jan Grewe
Browse files
Options
Downloads
Patches
Plain Diff
cleanup up http_request actions
parent
dbbb535d
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
+6
-10
6 additions, 10 deletions
propbox.yaml
with
6 additions
and
10 deletions
propbox.yaml
+
6
−
10
View file @
a30a87d9
...
@@ -153,21 +153,17 @@ switch:
...
@@ -153,21 +153,17 @@ switch:
name
:
"
Status:
Light"
name
:
"
Status:
Light"
optimistic
:
true
optimistic
:
true
turn_on_action
:
turn_on_action
:
-
http_request.post
:
-
http_request.post
:
http://${hostname_light}/switch/power/turn_on
url
:
http://${hostname_light}/switch/power/turn_on
turn_off_action
:
turn_off_action
:
-
http_request.post
:
-
http_request.post
:
http://${hostname_light}/switch/power/turn_off
url
:
http://${hostname_light}/switch/power/turn_off
-
platform
:
template
-
platform
:
template
id
:
propbox_fan
id
:
propbox_fan
name
:
"
Status:
Fan"
name
:
"
Status:
Fan"
optimistic
:
true
optimistic
:
true
turn_on_action
:
turn_on_action
:
-
http_request.post
:
-
http_request.post
:
http://${hostname_fan}/switch/power/turn_on
url
:
http://${hostname_fan}/switch/power/turn_on
turn_off_action
:
turn_off_action
:
-
http_request.post
:
-
http_request.post
:
http://${hostname_fan}/switch/power/turn_off
url
:
http://${hostname_fan}/switch/power/turn_off
interval
:
interval
:
-
interval
:
1min
-
interval
:
1min
...
@@ -215,8 +211,8 @@ script:
...
@@ -215,8 +211,8 @@ script:
// switch fan on when temperature/humidity is above max, unless humidity/temperature is below min
// switch fan on when temperature/humidity is above max, unless humidity/temperature is below min
if (
if (
!id(propbox_fan).state &&
!id(propbox_fan).state &&
(id(temperature).state >= atoi(id(temperature_max).state.c_str()) && id(humidity).state >= atoi(id(humidity_min).state.c_str())) ||
(
(id(temperature).state >= atoi(id(temperature_max).state.c_str()) && id(humidity).state >= atoi(id(humidity_min).state.c_str())) ||
(id(humidity).state >= atoi(id(humidity_max).state.c_str()) && id(temperature).state >= atoi(id(temperature_min).state.c_str()))
(
id(humidity).state >= atoi(id(humidity_max).state.c_str()) && id(temperature).state >= atoi(id(temperature_min).state.c_str()))
)
) {
) {
id(propbox_fan).turn_on();
id(propbox_fan).turn_on();
}
}
...
...
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