Skip to content

Outside Dates Check

Scott Gusler edited this page Feb 13, 2026 · 2 revisions

Outside Dates Check

Checks if the current time is OUTSIDE a date/time range.

Overview

Complement to "Between Dates Check" - the sensor is ON when current time is OUTSIDE the specified range, OFF when within it.

Configuration

  1. Select "Outside Dates Check"
  2. Configure:
    • Calculation Name: A friendly name
    • Start Datetime Entity: Entity with start datetime/time
    • End Datetime Entity: Entity with end datetime/time
    • Icon: Optional custom icon

Add Outside Dates

Examples

Outside Business Hours Alert

{
  "type": "outside_dates",
  "name": "Outside Business Hours",
  "start_datetime_entity": "input_datetime.business_start",
  "end_datetime_entity": "input_datetime.business_end"
}

Result: ON during evenings/weekends, OFF during 9 AM - 5 PM

After Quiet Hours

{
  "type": "outside_dates",
  "name": "After Quiet Hours",
  "start_datetime_entity": "input_datetime.quiet_start",
  "end_datetime_entity": "input_datetime.quiet_end"
}

Set:

  • Start: 22:00:00 (10 PM)
  • End: 06:00:00 (6 AM)

Result: ON from 6 AM - 10 PM (can use sounds), OFF during quiet hours

Automation Example

automation:
  - alias: "Play notification sounds only outside quiet hours"
    trigger:
      platform: state
      entity_id: binary_sensor.doorbell
      to: "on"
    condition:
      - condition: state
        entity_id: binary_sensor.after_quiet_hours
        state: "on"
    action:
      service: media_player.play_media
      data:
        media_content_type: music
        media_content_id: doorbell_chime

Previous: Back to Between Dates →

Clone this wiki locally