That was it! I made the change in the automation file to direct toward the switch I'm using and it's working!
Took two clones, a peach ghost and a chocolate 7 pot, from my outdoor garden and got it set up and running. Also had some japanese mustard greens seeds laying around and started those. The seeds have already cracked and should have some sprouts soon.
I noticed that my clones were wilting at 5 sec on, 20 mins off. I cranked it up to 15on/5 off and they rebounded. So cool to be able to control this via the app on the fly. Looking forward to getting some more sensors and figuring out more automation! I'm currently hand measuring my reservoir every day.
Emulating a Short-Cycle Timer
Nice!
Of course, an update just came through for Home Assistant today where they overhauled scripts and automations that would have made this WAY easier to do than how I did it.
Of course, an update just came through for Home Assistant today where they overhauled scripts and automations that would have made this WAY easier to do than how I did it.
Want to Support the Site?
Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
Use this Amazon referral link and any purchase you make within 24 hrs will earn LEDgardener a commission at no cost to you!
as far as i can tell its exactly the same as your code, but it only cycles once.
automations.yaml
scripts.yaml
automations.yaml
Code: Select all
- id: '1595019292093'
alias: Cycle Pump GO
description: ''
trigger:
- entity_id: input_boolean.cycle_pump
platform: state
to: 'on'
condition: []
action:
- data: {}
entity_id: script.1595017680358
service: script.turn_on
- id: '1595019345732'
alias: Cycle Pump STOP
description: ''
trigger:
- entity_id: input_boolean.cycle_pump
platform: state
to: 'off'
condition: []
action:
- data: {}
entity_id: switch.water_pump #PASTE IN THE ENTITY ID OF YOUR SWITCH HERE
service: switch.turn_off
- data: {}
entity_id: script.1595017680358
service: script.turn_off
- data: {}
entity_id: script.1595017404845
service: script.turn_off
Code: Select all
'1595017404845':
alias: Cycle Pump On and Off
sequence:
- data: {}
entity_id: switch.water_pump #PASTE IN THE ENTITY ID OF YOUR SWITCH HERE
service: switch.turn_on
- delay:
seconds: "{{ states('input_number.pump_on_time') | int }}" #change the "seconds" at the beginning of this line to minutes or hours or whatever unit you want your on time input to be... this one matters!
- data: {}
entity_id: switch.water_pump #PASTE IN THE ENTITY ID OF YOUR SWITCH HERE
service: switch.turn_off
- delay:
seconds: "{{ states('input_number.pump_off_time') | int }}" #change the "seconds" at the beginning of this line if you want your off time input to be in minutes, hours, or whatever
- data: {}
service: script.1595017680358
'1595017680358':
alias: Call Pump Script
sequence:
- wait_template: "{{ is_state('script.1595017404845', 'off') }}" #The wait ensures the other script is ready to be called
- data: {}
entity_id: script.1595017404845
service: script.turn_on
I finally figured it out!
heres the change that worked for me.
I changed the service to"script.turn_on" and added entity_id "script.159501730845"
Im assuming the reason it didnt work before is because it was only calling the service and not telling the script to turn on.
heres the change that worked for me.
Code: Select all
'1595017404845':
alias: Cycle Pump On and Off
sequence:
- data: {}
entity_id: switch.water_pump #PASTE IN THE ENTITY ID OF YOUR SWITCH HERE
service: switch.turn_on
- delay:
seconds: "{{ states('input_number.pump_on_time') | int }}"
- data: {}
entity_id: switch.water_pump #PASTE IN THE ENTITY ID OF YOUR SWITCH HERE
service: switch.turn_off
- delay:
seconds: "{{ states('input_number.pump_off_time') | int }}" #change the "seconds" at the beginning of this line if you want your off time input to be in minutes, hours, or whatever
- data: {}
entity_id: script.1595017680358
service: script.turn_on
'1595017680358':
alias: Call Pump Script
sequence:
- wait_template: "{{ is_state('script.1595017404845', 'off') }}" #The wait ensures the other script is ready to be called
- data: {}
entity_id: script.1595017404845
service: script.turn_on
Im assuming the reason it didnt work before is because it was only calling the service and not telling the script to turn on.
-
- LED-Curious
- Reactions:
- Posts: 18
- Joined: Wed Sep 02, 2020 3:48 am
I should really give nodered a solid effort someday, I just couldnt find a good tutorial on it espesially since most Home assistant setups are for home automation and online services and not so much greenhouse type setups.
I have all my pumps and fans working on timers, now i just need to figure out how to disable the circulating fan timer and keep the fan on while the lights are on.. Maybe the interlocking feature in esphome? Soooooo much information to learn and try to remember lol
I have all my pumps and fans working on timers, now i just need to figure out how to disable the circulating fan timer and keep the fan on while the lights are on.. Maybe the interlocking feature in esphome? Soooooo much information to learn and try to remember lol
-
- LED-Curious
- Reactions:
- Posts: 18
- Joined: Wed Sep 02, 2020 3:48 am
The first node in the string is actual an input Boolean in home asssistant for automation not the switch itself. This allows me to disable the automation while still being able to use the switch itself. You can have the input boolean switch off on a timer and another switch the fan on until the input boolean for the automation comes back on.