# Schedule Motion Events using INPUT Datetime helpers in Home Assistant

**URL:** <https://discourse.nodered.org/t/schedule-motion-events-using-input-datetime-helpers-in-home-assistant/39474>\
**Category:** General\
**Created:** [21 January 2021 03:02 UTC](https://discourse.nodered.org/t/schedule-motion-events-using-input-datetime-helpers-in-home-assistant/39474 "2021-01-21T03:02:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nld77](https://avatars.discourse-cdn.com/v4/letter/n/bcef8e/32.png) [@nld77](https://discourse.nodered.org/u/nld77)\
**Post date:** [21 January 2021 03:02 UTC](https://discourse.nodered.org/t/schedule-motion-events-using-input-datetime-helpers-in-home-assistant/39474/1 "2021-01-21T03:02:08Z")

</div>

I am new to Node Red, and I am using it to automate my existing Home Assistant automations.

I am looking to achieve a fairly simple automation for you guys out there..

I have created a sequence where a Binary Motion Sensor triggers a scene within Home Assistant, and then turns off after 10mins after no motion.. it all works perfectly..

...BUT....

I want to add a timing complexity to the sequence.

In Home Assistant I have used the datetime helpers to set times during the day for all my automations, as below:(these are a few)

A) input\_datetime.daytime\_start  
B) input\_datetime.daytime\_end  
C) input\_datetime.afternoon\_start  
D) input\_datetime.afternoon\_end

for example:

If the sequence is triggered between the time input in A and B, i want to Call service scene.turn\_on (scene1)  
and  
If the sequence is triggered between the time input in C and D, i want to Call service scene.turn\_on (scene2)

If anyone can help I would very much appreciate it.

The point behind it all, is that I would like to be able to change the HA helpers in one place and then ALL my automations update. I wish to do this as my days and times change regularly and irregularly.

Thank you all in Advance

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [22 March 2021 03:02 UTC](https://discourse.nodered.org/t/schedule-motion-events-using-input-datetime-helpers-in-home-assistant/39474/2 "2021-03-22T03:02:18Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
