Solution to track your google home alarms and timers and trigger different home assistant events

Ive ran into a wierd situation. Today (sunday) my automation was triggered for my alarm set on 8 am monday. I assume becuase the sensor will just read 8:00 and it triggered at 8:00 am regardless of the day. how can we make it have to match the day and time to trigger? same game with sensor.date?

edit: heres whats i came up with but it wasnt triggering. just gotta add the ‘date_time’ sensor sand then match it

  basementalarm:
    value_template: "{{ as_timestamp(states('sensor.basement_speaker_alarm')) | timestamp_custom('%Y-%m-%d,%H:%M') }}"
  basement_alarm_sensor:
    value_template: '{{ states("sensor.date_time") == states("sensor.basementalarm") }}'

edit this works great.

Thanks for the code!

@donbirko thanks for the code. It worked!

my googlehome alarm broken this week. Any pointers from the errors

2019-06-14 10:32:56 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform googlehome
File “/usr/src/homeassistant/homeassistant/components/googlehome/sensor.py”, line 38, in async_setup_platform

seems indeed not to work anymore :frowning:

take a look here:

https://community.home-assistant.io/t/google-home-alarm-track-error/124046/2?u=gekomax

Just wondering if this solution still works or not anymore?

If not are there any workaround to let Home assistant know alarm time via voice and google home?

1 Like

Any update on this?

Google has closed off this method of accessing the google home devices.

Hey, it is actually possible to gain access to the Google Home local API again, but it’s a bit more hassle since it requires authentication by short-lived tokens now. Rithvik Vibhu has done some excellent work figuring out how to do this.

To integrate this back into Hass (I was using e.g. the alarms API for my wakeup light routine), I wrote a very simple bash script that can automatically retrieve these tokens and push them to Home Assistant as an entity attribute, which can subsequently be used in templating. My script is available here:

Hope it’s helpful to someone!

6 Likes

I’m looking the requirements to run your script. Where do I put the Google Foyer proto files? I’m running a raspberry pi 4

You can put the proto files in any directory, as long as the directory structure from the original download is preserved. The location of the topmost folder is configurable in the script itself, under protoPath.

A Youtube video where someone shows himself/herself doing this would be awesome for many newbies (like me lol).

2 Likes

I am looking to do this , but i cant find how.
The google home component gives an error on loading that page too.
IS this component gone?

How can i read alarms/Timers? or even set it?

it’s gone the api has been walled off as far as I know.

@chvancooten says he knows a way , is that useless too?
it doenst look easy though

Or look here https://github.com/ludeeus/googledevices/issues/44#issuecomment-511360596
At the end, it says its merged

So might we see a new integration then?

1 Like

Maybe in the future currently it’s dead.

ow a pity :frowning:

I’d keep an eye on it tho.

1 Like

I hope this gets fixed. I’m hoping to get my google home alarms into HA.
If i’m looking at this right. The issue was something to do with API token. But it looks like its been fixed?

I’m not so sure.