Unable to find how to get HA to tell me what time it is

I can ask Alexa “Alexa, what time is it?” and I get a reply. I am trying to do this disconnected from the internet. Does anybody have an idea? I am new to Home Assistant but I can voice control my lights.

Are you using Alexa to voice control your lights? If so do you have a Home Assistant Cloud subscription, or are you using a custom integration?

I am moving over to HA from Alexa. I am in a high risk zone for hurricanes and go without internet for too long. I am using HA for what Alexa once did for me.

I am older, handicapped and live alone. I am trying to automate everything I can as soon as I can, Thank you for any help. Once I get a few tasks under my belt I should be able to modify more for other uses.

I have setup date/time as a helper but so many instructions over the web involve hardware I dont have. My server has date/time I thought it would be easy to send a “now” time to TTS to get current time but I dont know how to do that.

I use Piper text to speech and it works very well over my RaspiAudio Muse Luxe. Not sure where or if this would work “The time is {{ now().strftime(‘%H %M’) }}”

I use an HA automation that says “X minutes after Y pm” or “X minutes until Y am.”

alias: Assist Tell Time
description: Voice Assistant Tell the Time
  - platform: conversation
      - What is the time
      - Tell me the time
      - What time is it
      - Give me the time
      - Time please
condition: []
  - set_conversation_response: |-
      {% set hour = now().hour %}  
      {% set minute = now().minute %}  
      {% set ampm = "AM" %}  
      {% if hour > 12 %}
        {% set hour = hour - 12 %}
        {% set ampm = "PM" %}
      {% endif %}  
      {% if minute < 30 %}
          The time is now {{minute}} minutes after {{hour}} {{ampm}}
      {% elif minute == 30 %}
          The time is now {{hour}} {{minute}} {{ampm}}
      {% elif minute > 30 %}
        {% set minute = 60 - now().minute %}
        {% set hour = hour + 1 %}
        {% if hour > 12 %}
          {% set hour = hour - 12 %}
        {% endif %}
      The time is now {{minute}} minutes before {{hour}} {{ampm}}
      {% endif %}
mode: single

Than you so much, this looks great! I have never done an automation or script before so I will have to figure out how and where to insert this, I will work on this best I can.

This is far more complicated than I ever expected, I never wanted to become a programmer. I was looking for something to help me out not a new career. I have to abandon my thought that Home Assistant was a replacement for Alexa. When I loose the internet II may be able to work my lights, still better than where I am today.

Thank you for your help! I stepped away for a few days, came back and had your automation running in 20 minutes. Sorry for being terse, some days are better than others

1 Like