Google Keep Custom Component and Lovelace card

Is it possible to use two google accounts for me and my wife?

  • could the username be anything like:
username: !secret google_keep_me.username

username being the google mail address.
I’m getting an error right now:

Logger: homeassistant.helpers.entity
Source: custom_components/google_keep/sensor.py:85
First occurred: 10:30:16 (1 occurrences)
Last logged: 10:30:16

Update for sensor.google_keep_a472555ed8 fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/google_keep/sensor.py", line 85, in update
    self._keep.sync()
  File "/usr/local/lib/python3.7/site-packages/gkeepapi/__init__.py", line 996, in sync
    changes = self._reminders_api.list()
  File "/usr/local/lib/python3.7/site-packages/gkeepapi/__init__.py", line 595, in list
    json=params
  File "/usr/local/lib/python3.7/site-packages/gkeepapi/__init__.py", line 229, in send
    raise exception.APIException(error['code'], error)
gkeepapi.exception.APIException: {'errors': [{'domain': 'global', 'reason': 'backendError', 'message': 'Backend Error'}], 'code': 503, 'message': 'Backend Error'}

It is possible, you just have to define 2 sensors.

About the error, are you sure you have provided correct credentials? Or maybe you have 2FA?

Got it. That was a google_keep sensor number error. Got two google keeps accounts working now, tks.
Is it possible to use wildcards with titles or labels?

Unfortunately no, wildcards are not supported. But you can specify multiple titles/labels. Integration filters notes the following way:
(title1 or title2 or …) and (label1 or label2 or …)

Tks. Would be great to update the doc for that (2 google accounts, multiple titles / labels, where to find your own sensor maybe).

I’m getting this error.

Logger: homeassistant.components.sensor
Integration: Sensor (documentation, issues)
First occured: 11:20:33 (6 occurences)
Last logged: 11:20:34

Error while setting up google_keep platform for sensor

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 179, in _async_setup_platform await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT) File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 442, in wait_for return fut.result() File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run result = self.fn(*self.args, **self.kwargs) File “/config/custom_components/google_keep/sensor.py”, line 39, in setup_platform login_success = keep.login(username, password) File “/usr/local/lib/python3.7/site-packages/gkeepapi/init.py”, line 695, in login self.load(auth, state, sync) File “/usr/local/lib/python3.7/site-packages/gkeepapi/init.py”, line 741, in load self.sync(True) File “/usr/local/lib/python3.7/site-packages/gkeepapi/init.py”, line 1019, in sync labels=[i.save() for i in self._labels.values()] if labels_updated else None, File “/usr/local/lib/python3.7/site-packages/gkeepapi/init.py”, line 359, in changes json=params File “/usr/local/lib/python3.7/site-packages/gkeepapi/init.py”, line 221, in send response = self._send(**req_kwargs).json() File “/usr/local/lib/python3.7/site-packages/requests/models.py”, line 897, in json return complexjson.loads(self.text, **kwargs) File “/usr/local/lib/python3.7/site-packages/simplejson/init.py”, line 525, in loads return _default_decoder.decode(s) File “/usr/local/lib/python3.7/site-packages/simplejson/decoder.py”, line 370, in decode obj, end = self.raw_decode(s) File “/usr/local/lib/python3.7/site-packages/simplejson/decoder.py”, line 400, in raw_decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I have solved the problem by editing the requirements in manifest.json.

From

gkeepapi

To

gkeepapi==0.11.14
1 Like

I have incorporated this change in v1.0.1

Has anyone had any luck theming this lovelace card with card-mod? I am striking out here and I hate the white background on my dark theme. When I switch to the card’s dark mode the text stays black which is not all that useful.

Hello all!

I have an issue with this module. I installed it on my HA running plain vanilla on hassio, NUC.
This is the log of the issue:

2021-01-18 18:00:37 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up google_keep platform for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 199, in _async_setup_platform
await asyncio.shield(task)
File “/usr/local/lib/python3.8/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/google_keep/sensor.py”, line 39, in setup_platform
login_success = keep.login(username, password)
File “/usr/local/lib/python3.8/site-packages/gkeepapi/init.py”, line 693, in login
ret = auth.login(username, password, get_mac())
File “/usr/local/lib/python3.8/site-packages/gkeepapi/init.py”, line 59, in login
raise exception.LoginException(
gkeepapi.exception.LoginException: (‘BadAuthentication’, None)

This is the relevant part of my config:

  • platform: google_keep
    username: ********@gmail.com
    password: mypassword

Does anybody know what I am doing wrong?

There is an issue on GitHub: link

1 Like

Thanks a lot - can’t wait for this to be solved… Any alternative for todo lists in the meantime?

1 Like

Just for everyone to know : it seems to work again for me since release 2021.2.2 - I hope it will last!

1 Like

It probably depends on version of requests library

Installed today and confirm working fine on HA supervised on generic x86 machine. Needed manual API install, as stated in manual.

Thanks very much!

Thanks for the great work you’ve put into it!

I was just wondering if you are able to look at the edit-feature?

It would really be nice to tick the boxes in HA mounted on a panel in the hallway instead of using my phone.

Nope, recently I work almost exclusively on stuff related to Xiaomi vacuums

nice work on the Google Keep Integration!

For editing the Google Keep List, i am using Google Assistant/Home via Google Nest. I know its now the same but does a great job when you need the HASS Inegration for Display purposed only

Does this still work for people ? I’m setting it up for the first time. I added via HACs but it never shows up to add under : Configuration → Integrations. I have installed gkeepapi in my HA container (running on Debian) and tested using the credentials I have in my secrets.yaml and they work OK. I also noted that the frontend piece doesn’t show up either ie I can’t add the card onto a dashboard (But I wasn’t sure if it was dependent on the integration being present) Thanks.

For me it still works, but creates some minor errors in logs. Author is very slow with adequate response. Says it will be fixed soon, but is taking his time :slight_smile: