Home Assistant Value Templates in Node Red

Hey all,

I have a yaml home assistant automation that I want to convert to NR. But I'm unsure how to have NR do the value template checks?

Can a sequence be a named entity as it were, that can be referenced by other sequences?

this is my .yaml

alias: 'Motion: Morning Bathroom'
description: ''
  - type: motion
    platform: device
    device_id: 9c689b630452da3f476181b33d1fa1b4
    entity_id: binary_sensor.bathroom_motion_sensor_motion
    domain: binary_sensor
  - condition: time
    after: '07:00'
    before: '11:00'
  - condition: template
    value_template: >-
      {{ ((as_timestamp(now()) | float) -
      (as_timestamp(state_attr('automation.motion_morning','last_triggered')) |
      default(0) | float)) > 36000.0 }}
  - condition: template
    value_template: >-
      {{as_timestamp(now()) -
      int >= 14400}}
  - service: script.alexa_flash_briefing_volume
    data: {}
  - service: script.good_morning_bathroom
    data: {}
mode: single

Try asking on the Node-RED section of the Home Assistant Community Forum :wink:

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