question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

4 is not a valid GoogleHomeAlarmStatus

See original GitHub issue

Describe the bug

Integration fails to load entities. Exceptions in log image

Version of the integration

If you are unsure about the version check the github release here.

1.40

Glocaltokens Version (Underlying package)

bash-5.0# pip show glocaltokens
Name: glocaltokens
Version: 0.3.0

Logs

2021-04-11 14:48:40 ERROR (MainThread) [custom_components.google_home] Unexpected error fetching sensor data: 4 is not a valid GoogleHomeAlarmStatus
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 173, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 143, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/google_home/api.py", line 246, in update_google_devices_information
    coordinator_data = await asyncio.gather(
  File "/config/custom_components/google_home/api.py", line 220, in collect_data_from_endpoints
    device = await self.get_alarms_and_timers(device, ip_address, auth_token)
  File "/config/custom_components/google_home/api.py", line 139, in get_alarms_and_timers
    device.set_alarms(resp.get(JSON_ALARM))
  File "/config/custom_components/google_home/models.py", line 46, in set_alarms
    self._alarms = [
  File "/config/custom_components/google_home/models.py", line 47, in <listcomp>
    GoogleHomeAlarm(
  File "/config/custom_components/google_home/models.py", line 144, in __init__
    self.status = GoogleHomeAlarmStatus(status)
  File "/usr/local/lib/python3.8/enum.py", line 339, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.8/enum.py", line 662, in __new__
    raise ve_exc
ValueError: 4 is not a valid GoogleHomeAlarmStatus```

## Debug log

<!-- To enable debug logs, put the below snippet in your configuration.yaml file.
You can delete the below snippet before you submit this issue.
-->

```yaml
logger:
  default: debug
  logs:
    custom_components.google_home: debug

2021-04-11 14:52:42 DEBUG (MainThread) [custom_components.google_home] Fetching data from Google Home device Living Room TV - https://192.168.1.AAA:8443/setup/assistant/alarms
2021-04-11 14:52:42 DEBUG (MainThread) [custom_components.google_home] Fetching data from Google Home device Entryway clock - https://192.168.1.AAA:8443/setup/assistant/alarms
2021-04-11 14:52:42 DEBUG (MainThread) [custom_components.google_home] Fetching data from Google Home device Bedroom speaker - https://192.168.1.AAA:8443/setup/assistant/alarms
2021-04-11 14:52:42 DEBUG (MainThread) [custom_components.google_home] Fetching data from Google Home device Kitchen speaker - https://192.168.1.AAA:8443/setup/assistant/alarms
2021-04-11 14:52:43 ERROR (MainThread) [custom_components.google_home] Unexpected error fetching sensor data: 4 is not a valid GoogleHomeAlarmStatus
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 173, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 143, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/google_home/api.py", line 246, in update_google_devices_information
    coordinator_data = await asyncio.gather(
  File "/config/custom_components/google_home/api.py", line 220, in collect_data_from_endpoints
    device = await self.get_alarms_and_timers(device, ip_address, auth_token)
  File "/config/custom_components/google_home/api.py", line 139, in get_alarms_and_timers
    device.set_alarms(resp.get(JSON_ALARM))
  File "/config/custom_components/google_home/models.py", line 46, in set_alarms
    self._alarms = [
  File "/config/custom_components/google_home/models.py", line 47, in <listcomp>
    GoogleHomeAlarm(
  File "/config/custom_components/google_home/models.py", line 144, in __init__
    self.status = GoogleHomeAlarmStatus(status)
  File "/usr/local/lib/python3.8/enum.py", line 339, in __call__
    return cls.__new__(cls, value)
  File "/usr/local/lib/python3.8/enum.py", line 662, in __new__
    raise ve_exc
ValueError: 4 is not a valid GoogleHomeAlarmStatus
2021-04-11 14:52:43 DEBUG (MainThread) [custom_components.google_home] Finished fetching sensor data in 23.034 seconds

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
KapJIcommented, Apr 12, 2021

@whitehead-aa it’s merged. Can you test the master?

2reactions
whitehead-aacommented, Apr 12, 2021

On Lenovo smart clock “state_four” comes back when I make the alarm inactive: image image

When setting it active again status changes to set: image image

I will try on a home hub as well but currently it’s not responding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nest Guard and Detect status messages and help codes
Open the Nest app. Tap Security Home guard icon . Each Detect is listed according to its location name. If there are any...
Read more >
Alarm control panel not working with Google Home
Hi, I setup an alarm control panel, just as a test: alarm_control_panel: - platform: manual name: Allarme code: !secret alarm_code ...
Read more >
How Do I Set Up My Alarm.com System With Google Home?
An Alarm.com account can be set up with Google Home and Google Assistant by following one of four (4) different methods.
Read more >
Best Google Home Security Systems in 2022
Read on for details about how these leading security companies work with Google Home. Google Assistant Voice Control Features We Tested. Arm ...
Read more >
Google Home and Google Nest: How to troubleshoot the 3 ...
For Android phones · 1. Tap Settings > Security & Location > Location > Use location. · 2. Make sure the toggle is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found