Google home alarm track error

Hi,

I’ve been able for 2 months to track google home alarms and use them as automation triggers.

Today I’ve got this error and tracking is not working anymore (I got “unknow” in sensors I use to track the alarms):

Could not render template alarm2_remaining: UndefinedError: ‘mappingproxy object’ has no attribute ‘alarm’

Code I use:

- platform: rest
  name: GoogleHomeAlarmsBunker
  json_attributes:
#  - timer
  - alarm
  resource: http://192.168.1.16:8008/setup/assistant/alarms
  value_template: '{% if value_json.alarm[0] is defined %}{{ value_json.alarm[0].id }}{% endif %}'
  force_update: true
    alarm2_remaining:
      value_template: "{% if states.sensor.googlehomealarmsbunker.attributes.alarm[0] is defined %}{{ (((states.sensor.googlehomealarmsbunker.attributes.alarm[0].fire_time / 1000) - as_timestamp(now())) /60) | round(0)}}{% endif %}"
      entity_id: sensor.googlehomealarmsbunker
      unit_of_measurement: "min"

Any suggestion please?
Thanks
Gekomax: +1:

Google pushed an update to google home devices rendering the local API virtually useless…
https://github.com/home-assistant/home-assistant/issues/24815

1 Like

Thanks… I didn’t know :sleepy:

Love the cloud, but loathe the cloud at the same time. They give features, they take them away …

This was local, no cloud involved.

Ah, but what I meant was that features and APIs on IoT devices are at the whim of the manufacturer. A mere firmware update can remove features in an instant.

The funny thing here is that it was not a FW update.
If you look at the issue, you see I was on the same FW version as users that first reported it :man_shrugging:

Mine started working this morning. I haven’t made a change.

it’s up and down like a poorly constructed rollercoster it seems.
There are some more info about the future here https://github.com/ludeeus/googledevices/issues/44#issuecomment-511360596

1 Like