Google home alarm track error


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
#  - timer
  - alarm
  value_template: '{% if value_json.alarm[0] is defined %}{{ value_json.alarm[0].id }}{% endif %}'
  force_update: true
      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?
Gekomax: +1:

Google pushed an update to google home devices rendering the local API virtually useless…

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

1 Like