How to know which doors/windows are opened at 10pm?

which service can i use to know which door sensors are opened at 10pm?
i know trigger will be time. but no idea what service to use in Action. :frowning:

The service will be whichever notification service you choose.

You can use templating to returned the open windows/doors in the notification message.

Example 1
Example 2

There are infinite ways to format the message. If you explain how you want the message to be formatted, someone can help you with a more specific answer.

thank you for the links!
first, i created the Binary Group in Helpers tab. then i editted the yml code to fit my needs and this works:

alias: alert door status
description: ""
trigger:
  - platform: event
    event_type: telegram_command
    event_data:
      command: /door
action:
  - service: telegram_bot.send_message
    data:
      message: >
        {% set ow = expand('binary_sensor.windows') | selectattr('state', 'eq',
        'on') | map(attribute='name') | list%} {%- set qty = ow | count -%} {%-
        if qty != 0 -%} {{-' the '}}{{-' and '.join((ow|join(', ')).rsplit(', ',
        1)) }} {{-' is ' if qty==1 else ' are '}}open.  {% else %} all windows
        are closed. {% endif %}
mode: single

this is even better cause i can check doors any time i want