# Date/Time Package

# -----------------------------------------------------------------------------
# Time of Day Sensors and Helpers
sensor:
  - platform: time_date
    display_options:
      - 'time'
      - 'date'
      - 'date_time'

template:
  - sensor:
      - name: hour
        state: "{{ now().strftime('%I') }}"
      - name: minute
        state: "{{ now().strftime('%M') }}"

binary_sensor:
  - platform: tod
    name: Before Dawn
    after: "00:00"
    before: sunrise

  - platform: tod
    name: Morning
    after: "04:00"
    before: "12:00"

  - platform: tod
    name: Afternoon
    after: "12:00"
    before: "17:00"

  - platform: tod
    name: Evening
    after: "17:00"
    before: "21:00"

  - platform: tod
    name: Night
    after: "21:00"
    before: "04:00"

  # - platform: workday
  #   country: US
