- platform: "time_date"
  display_options:
    - "time"
- platform: "template"
  sensors:
    alarmclock_hour:
      value_template: "{{ states.input_slider.alarmclock_hour.state | int }}"
    alarmclock_minute:
      value_template: "{{ states.input_slider.alarmclock_minute.state | int }}"
    alarmclock_time:
      value_template: >-
        {{ states.sensor.alarmclock_hour.state }}:
        {%- if states.sensor.alarmclock_minute.state|length == 1 -%}
          0
        {%- endif -%}
          {{ states.sensor.alarmclock_minute.state }}
    alarmclock_time_long:
      value_template: >-
        {% if states.sensor.alarmclock_hour.state|length == 1 -%}
          0
        {%- endif -%}
          {{ states.sensor.alarmclock_hour.state }}:
        {%- if states.sensor.alarmclock_minute.state|length == 1 -%}
          0
        {%- endif -%}
          {{ states.sensor.alarmclock_minute.state }}
