Support timers in Google Assistant

Google has a timer device trait defined at Actions on Google Smart Home  |  Google Developers. Since Home Assistant added timers as a first class citizen, it would be great to support it in google assistant.

What exactly are you looking for? I don’t understand the request.

Allow Google assistant to interact with HA timer entities by implementing Actions on Google Smart Home  |  Google Developers for the timer domain.

This would allow users to ask google how much time is left on the timer or adjust the time.

How is this different from just using the timers in Google and making HA read the state of the timer?

There is an HACS integration that brings Google timers and alarms in to HA.

If Google can support HA based timers, support for that should be extended. I have a bunch of timers set up for chores, etc. which are controlled by various HA automations. It would be nice to pull that data using Google Assistant rather than have to have HA get that data from the Assistant.

I’m a huge +1 on this feature request.

1 Like

This is like saying Google home supports lights so why do we need to support showing lights from HA into Google?

It’s the same reason, because there are timers connected to devices that Google doesn’t control.

For example you may have a thermostat that has timer for how long it runs and it doesn’t have Google support.

But the documentations you linked to is the other way around as I can see.
It’s to display Google timers in other platforms (like HA).

That is why I could not understand your request. No need to be snarky.

If you want Google to respond with how much is left of an HA timer then you can expose a script to Google that either just TTS one timers left time or finds all timers that is currently running and their status.

I have an automation doing this in Node red, but it should be possible in HA also.

Apologize if I came off as snarky. It’s a little difficult to communicate with you. It seems like you were making certain assumptions such as “assuming the documentation is about exposing Google timers in HA”, though I have twice explained it’s about exposing HA timers in Google. Thanks for explaining what you were thinking.

Why do you think the documentation I linked to is related to existing Google timers in HA? From the linked documentation:

action.devices.traits.Timer - The Timer trait represents a timer on a device.

For instance, a smart sprinkler controller or smart light switch may have a built-in timer. This trait can be used to control a built-in timer on devices, such as starting a new timer as well as pausing and canceling a running timer, and asking how much time is remaining.

It is a smart home API which is an “interface”. This means it is a common way of speaking between Google and other services such as HA so it is used in both directions.

If HA were to implement importing Google’s timers, we would expect reading the timer trait according to this interface.

But also if we are exposing timers to Google from HA this is the interface we need to implement in HA so that Google can read and modify HA timers.

Your examples of roundabout ways to support timers work, but to give another example It’s like controlling a thermostat with switches and scripts. I could have:

  • A script for doing TTS of the thermostat temperature
  • A button for increasing the thermostat temperature by 1 degree
  • A button for decreasing the thermostat temperature by 1 degree

Or HA could implement Google’s thermostat trait and we can use the thermostat as a first class citizen and support voice commands such as changing the thermostat by any number of degrees. HA has done this in the google_assistant component which is great!

In the same way I could have a button that increases an HA timer by one minute or we could implement the Google interface and have full support so I could have natural voice support and say things like:

  • Cancel timer
  • Pause / resume timer
  • Add 5 second to timer
  • Add a minute to the timer

Hey all. Most of what everyone said in this thread is over my head. I hope I am posting in the right place.

I can say to my Google Speaker: “Hey Google, start a four minute timer”. Then it confirms it is starting one, and rings when completed. Timers are probably one of the things I use MOST in my home, simply because I do get distracted easily and timers help me stay on track.

I can also say: “Hey Google, turn on the lights”, and it will turn on the lights in the room I am in. The same goes for the air-conditioner: “Hey Google, turn on the air-conditioner”.

Now, I have installed the Google SDK in HA, and it works. I can send a text command like “turn on the lights”, or “turn on the air conditioner” or such. BUT, whenever I have HA use the SDK to “say”: “start a four minute timer”, Google responds that it cannot control timers on this device.

Am I doing something wrong, or am I missing something?

Just to clarify: I tested the automation that I am running, by using the text command “Turn on the lights”, and it works. Change that to “Start a timer”, and it says it cannot.

Any advice appreciated.

Starting timers isn’t supported and can’t be supported in the Google Assistant SDK. I’ll mention this in the docs.

1 Like

Thanks for the reply here :+1: