I’m about a week into HA, so obviously still learning…
I set up a custom SMTP gmail notifier, so I could control the sender name. It worked for a couple days and then “disappeared” (existing actions using it showed it as unknown, and it no longer showed as a Notifier choice). The only hint was an error in the log that I had a 403 insufficient permissions error on the vacation setting (which I’m not using). I couldn’t find an issue, and as a last resort deleted and recreated my gmail app specific password and updated my config. Everything worked fine again for 12 hours, and now it’s failing again with the same error and “does not exist” behavior.
Here is my (redacted) configuration.yaml definition:
notify:
- name: "Carmel GMail SMTP"
platform: smtp
server: "smtp.gmail.com"
port: 587
timeout: 15
sender: "[email protected]"
encryption: starttls
username: "[email protected]"
password: "secret"
recipient:
- "[email protected]"
sender_name: "Carmel House"
My HA logs shows an error: “google_mail: Error on device update!” This includes a long traceback:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:737
integration: Sensor (documentation, issues)
First occurred: 12:20:05 PM (1 occurrences)
Last logged: 12:20:05 PM
google_mail: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 737, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1318, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/components/google_mail/sensor.py", line 45, in async_update
data: dict = await self.hass.async_add_executor_job(settings.execute)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.13/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python3.13/site-packages/googleapiclient/http.py", line 938, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://gmail.googleapis.com/gmail/v1/users/me/settings/vacation?alt=json returned "Request had insufficient authentication scopes.". Details: "[{'message': 'Insufficient Permission', 'domain': 'global', 'reason': 'insufficientPermissions'}]">
There is also a warning on googleapiclient.http: "Encountered 403 Forbidden with reason “insufficientPermissions”. Fron looking at the raw log, this appears to be from the same error above.