Motion Triggers Blue Iris and Announces on Echo

Hey guys,

I’m new to all this, and I’ve only had Hassio running on an RP3+ for a few days. I have an automation working but I’m struggling a little with the syntax for the time condition.

I have a Zwave motion detector in my driveway. When motion is detected HA sends a command to Blue Iris to record on all cameras. A second action is that HA sends a message which causes my Echo Plus to announce that motion was detected.

All this is working except I want the condition of it triggering only between 8am and 11:59pm to only apply to the announcement on my Echo Plus. In other words if its after midnight, I still want the cameras to record but I don’t want the Echo Plus to wake me up. Here is my automation from automations.yaml:

- id: '1534452964380'
  alias: Motion Trigger Blue Iris Record
  trigger:
  - entity_id: sensor.ecolink_motion_detector_burglar
    from: '0'
    platform: state
    to: '8'
  condition:
  - after: '8:00'
    before: '23:59'
    condition: time
  action:
  - service: rest_command.blueiris_request
  - data:
      entity_id: media_player.echo_plus
      message: Motion Detected in Drive Way
    service: media_player.alexa_tts

Sorry for the noob question. Help would be much appreciated!

Was able to get it going with:

- id: '1534452964380'
  alias: Motion Trigger Blue Iris Record
  trigger:
  - entity_id: sensor.ecolink_motion_detector_burglar
    from: '0'
    platform: state
    to: '8'
  condition: []
  action:
  - service: rest_command.blueiris_request
  - after: '8:00'
    before: '23:59'
    condition: time
  - data:
      entity_id: media_player.echo_plus
      message: Motion Detected in Drive Way
    service: media_player.alexa_tts