vergo
September 29, 2017, 6:06am
1
Hi, at the moment i water my plants every day for 10 minutes. That´s to much.
I want to water them every three days for ten minutes.
Need some help with the code.
That´s the code I use at the moment:
- trigger:
platform: time
at: '07:00:00'
action:
service: switch.turn_on
entity_id: switch.sonoff_pumpe_teich
- trigger:
platform: time
at: '07:10:00'
action:
service: switch.turn_off
entity_id: switch.sonoff_pumpe_teich
sjee
September 29, 2017, 6:56am
2
You could simply add a condition to specify days:
weekday:
- mon
- wed
- fri
Or a condition based on state off:
state: 'off'
for:
minutes: 4310
Or use a template to compare the current time to state.last_changed
of your Sonoff.
nickrout
(Nick Rout)
September 29, 2017, 7:16am
3
Yep, or get a moisture sensor and apply water when needed.
Or water on days divisible by 3 (ie on the 3rd, 6th, 9th etc. - Gets a bit weird at the end of the month depending which month it is).
sjee
September 29, 2017, 7:23am
4
Or… this cool solution from @Tinkerer using an input slider
So many possibilities let us know if you need more help.
vergo
September 29, 2017, 9:23am
5
Thank you for your support. I´ll try that code and we will see what happened.
- trigger:
platform: time
at: '07:00:00'
condition:
condition: time
weekday: sun
weekday: wed
action:
service: switch.turn_on
entity_id: switch.sonoff_pumpe_teich
- trigger:
platform: time
at: '07:10:00'
condition:
condition: time
weekday: sun
weekday: wed
action:
service: switch.turn_off
entity_id: switch.sonoff_pumpe_teich
vergo
September 29, 2017, 9:26am
6
I´ve tryed a moisture sensor but after two weeks the sensor was corroded an unuseable
sjee
September 29, 2017, 10:52am
7
Don’t want to spoil the surpize… but it will probably not work as your syntax is wrong. It need to be the same way as in my reply and specified in the docs.
weekday:
- sun
- wed
vergo
October 1, 2017, 5:21am
8
Hi, worked perfect! Thank you!