Hello Guys!
I’m trying to create an automation to enable a pump for 3 minutes if motion is detected on a sensor and the time is between 6am and 23.30.
For some reason I fail to set it up the right way.
Can you please advise ?
Here is the sample I’ve created:
- id: '1648667920315'
alias: Turn Off Pump (Duplicate) TEst
description: ''
trigger:
- entity_id: binary_sensor.mozgas_iroda
platform: state
to: 'on'
condition:
- after: '00:06:00'
before: '23:30:00'
condition: time
action:
- data:
type: turn_on
entity_id: switch.smart_switch_7
device_id: 44f07b44afec5f0a6029eddecd0e4ccb
domain: switch
- timeout: 00:03:00
wait_template: ''
- data:
type: turn_off
entity_id: switch.smart_switch_7
device_id: 44f07b44afec5f0a6029eddecd0e4ccb
domain: switch
mode: single