Skip to content

Commit

Permalink
docs(cookbook): Update using date and time to show examples for the t…
Browse files Browse the repository at this point in the history
…ime node
  • Loading branch information
zachowj committed May 31, 2021
1 parent 3cb3c08 commit a07ad4d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/cookbook/using-date-and-time-entities-to-trigger-flows.md
@@ -1,5 +1,21 @@
# Using Date and Time entities to trigger flows

There is now a [time](../node/time.md) node that simplifies the example flows below into one node.

## Using the time node

- Home Assistant Companion app next alarm sensor

<<< @/examples/cookbook/using-date-and-time-entities-to-trigger-flows/example1a_using_time_node.json

- Adding an offset and on/off switch by exposing the node the Home Assistant using the [custom component](https://github.com/zachowj/hass-node-red).

<<< @/examples/cookbook/using-date-and-time-entities-to-trigger-flows/example1b_using_time_node.json

- Daily alarm using Datetime Entity

<<< @/examples/cookbook/using-date-and-time-entities-to-trigger-flows/example2_using_time_node.json

## Home Assistant Companion app next alarm sensor

Here's a basic example of using the Home Assistant Companion app next alarm sensor.
Expand Down
@@ -0,0 +1 @@
[{"id":"f8329c.6b39dd68","type":"ha-time","z":"93fe35bb.4fb688","name":"","server":"","version":0,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityId":"sensor.pixel_next_alarm","property":"state","offset":0,"offsetType":"num","offsetUnits":"minutes","randomOffset":false,"repeatDaily":false,"payload":"$entity().state","payloadType":"jsonata","debugenabled":true,"x":262,"y":864,"wires":[["513ebdd1.58be64"]]},{"id":"513ebdd1.58be64","type":"debug","z":"93fe35bb.4fb688","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":492,"y":864,"wires":[]}]
@@ -0,0 +1 @@
[{"id":"ff4c2fea.d7d15","type":"ha-time","z":"93fe35bb.4fb688","name":"","server":"","version":0,"exposeToHomeAssistant":true,"haConfig":[{"property":"name","value":"Enable next alarm"},{"property":"icon","value":""}],"entityId":"sensor.pixel_next_alarm","property":"state","offset":"$entities(\"input_number.offset\").state","offsetType":"jsonata","offsetUnits":"minutes","randomOffset":false,"repeatDaily":true,"payload":"$entity().state","payloadType":"jsonata","debugenabled":false,"x":216,"y":1184,"wires":[["fceff1c.3c74f1"]]},{"id":"fceff1c.3c74f1","type":"debug","z":"93fe35bb.4fb688","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":444,"y":1184,"wires":[]}]
@@ -0,0 +1 @@
[{"id":"68a7a591.c05a1c","type":"ha-time","z":"93fe35bb.4fb688","name":"","server":"","version":0,"exposeToHomeAssistant":true,"haConfig":[{"property":"name","value":"Alarm enabled"},{"property":"icon","value":""}],"entityId":"input_datetime.alarm","property":"state","offset":0,"offsetType":"num","offsetUnits":"minutes","randomOffset":false,"repeatDaily":true,"payload":"$entity().state","payloadType":"jsonata","debugenabled":false,"x":238,"y":1488,"wires":[["96f4596a.01bed8"]]},{"id":"96f4596a.01bed8","type":"debug","z":"93fe35bb.4fb688","name":"do stuff","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":444,"y":1488,"wires":[]}]

0 comments on commit a07ad4d

Please sign in to comment.