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

Nobody?
I’m thinking about a trigger:

  • if alarm is put off

condition:
alarm set on device x

then turn on script

Not sure if thats possible

1 Like

Nobody? any idea?
Is this topic dead?
@Ilja_Leiko any idea?

1 Like

So by default it takes 180 secs to sync changes, so you’ll be able to see it only after that time. Then, it might be the integration is not capable to retrieve the device status, as this keeps happening for one of the 2 Home mini I have. One of them seems to (pretty much) always work fine, the other fine is always unreachable. This morning I discovered it was the opposite, so it’s so random and annoying I’ve never been able to figure it out so I just gave up for now. The integration is there and installed, lovelace cards too but I’m not using it.

I am also trying to turn on the bedroom light after the alarm goes off but couldn’t catch that in HA. Probably because it takes 3 minutes for it to update HA. So, if I am getting it right, the only way is to get the alarms that are set and do a time match with HA time and trigger the automation. But to me, this seems to be unnecessary processing of comparing time. Has anybody done good automation based on alarm status?

Here’s my automation, as you said, doing time match is the only thing working :slight_smile: The 3 minutes to update , doesnt play a role there since i dont put alarms for time less than 3 minutes :slight_smile: lol

- id: 'Google Home alarm'
  alias: 'GH Alarm trigger'
  trigger:
  - platform: time
    at: sensor.wekker_alarms
  condition: []
  action:
  #Do you actions / sripts
  - entity_id: light.nachtlampje
    service: light.turn_on
    data:
      brightness_pct: 80
      transition: 200
  - delay: 00:00:10
  - service: script.turn_on 
    target:
      entity_id: script.google_home_say
    data:
      variables:
        tts_message: "Goeiemorgen ! Tijd om rustig op te staan."
        tts_target: media_player.slaapkamer
        tts_volume: 0.10
  - delay: 00:02:00
  - entity_id: light.nachtlampje
    service: light.turn_off 
  mode: single  

Is this something new that it takes three minutes to update?
I remember being able to set a timer on 20 seconds and it was updated in HA before it rang.

It seems update_entity works to force an update, so I guess that could be a workaround.

1 Like

You can adjust the update yourself in the integration page:

With version 1.6 we have changed the update interval from 10 seconds to 180 seconds. This is due to #202. Some people are experiencing devices timing out when trying to fetch data from them.

You can manually change the update interval by pressing the configure button on the integration page. Default is 180 seconds. Change this at your own risk! If your devices are timing out, please increase this until it is stable again.

Trying to set this up in a second instance, but i must be doing something wrong…
I added the app in the google account
Then added the integration, all good, but i dont see any devices…

Trying to set it up at my friends house, and he has no entities either.
How did you solve it?
Theres nothing special in the network and i enable mdns in his network

Do you have an delay of the automation, because of the different internal time check or time state. I do have a slide delay of 4 sec in this automation

trigger:
  - platform: template
    value_template: "{{ now() >= states('sensor.wohnzimmer_timers')|as_datetime }}"
condition: []
action:
  - device_id: 659d836acf7ea85d3c6470907bc9d72a
    domain: light
    entity_id: light.deckenleuchte
    type: flash
mode: single

and 1.5 sec in this automation

trigger:
  - platform: time
    at: sensor.wohnzimmer_timers
condition: []
action:
  - service: notify.marceltelegram
    data:
      message: Test
mode: single

Is there a way to set the trigger time 10 sec before it the server time?

Is it possible to flag a google device to be ignored? I have several devices found by the integration, but I’m only interested in one.

Hi. I am trying to use the UI to set an automation that fires when one of the Google home hub alarms goes off. I use the time platform and set it equal to the sensor that maps to the display I am using.

Here’s what the developer tools says the state of the sensor is:

next_alarm_status: set
alarm_volume: 72
alarms:
  - alarm_id: alarm/96f2f1d2-3ce1-4334-ad76-86d666fb37b0
    fire_time: 1690486200
    local_time: '2023-07-27 12:30:00'
    local_time_iso: '2023-07-27T12:30:00-07:00'
    status: set
    label: null
    recurrence: null
device_class: timestamp
icon: mdi:alarm-multiple
friendly_name:  Office display alarms

But this does not fire the trigger, at least in 2023.7.3. Any ideas?

Do you have an updated version of this? Never got it to work for me tbh but the timers do show up in HA.

I was able to start a timer in a google NEST using an Alexa templated command for a variable time (ie washing machine remaining time), then i was able to use a template a sensor with the HACs integration and stop the timer, it is a bit clumsy, so I was wondering if it’s possible to pass an analog or numeric helper along with a toggle helper to google and then start an automation in google home that templates or reads that value for the specific amount of time. Just need to know if it’s possible or if anybody has done it as I havent really done anythign with the google scripts automation.