Chouffy/home_assistant_tgtg

Unavailable entity

Closed this issue · 4 comments

System Health details

System Information

version core-2023.3.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.10
os_name Linux
os_version 5.15.84-v8
arch aarch64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4865
Installed Version 1.31.0
Stage running
Available Repositories 1248
Downloaded Repositories 21
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 9.5
update_channel stable
supervisor_version supervisor-2023.03.1
agent_version 1.4.1
docker_version 20.10.22
disk_total 916.2 GB
disk_used 46.2 GB
healthy true
supported true
board rpi4-64
supervisor_api ok
version_api ok
installed_addons Samba share (10.0.0), Duck DNS (1.15.0), Terminal & SSH (9.6.1), ESPHome (2023.2.4), Zigbee2MQTT (1.30.2-1), motionEye (0.18.0), File editor (5.5.0), Mosquitto broker (6.1.3), ADS-B Multi-Portal Feeder (1.20.0)
Dashboards
dashboards 2
resources 15
views 13
mode storage
Recorder
oldest_recorder_run 12 mars 2023 à 10:37
current_recorder_run 15 mars 2023 à 19:38
estimated_db_size 39.57 MiB
database_engine sqlite
database_version 3.38.5

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

Since a few days, all the entity are unavailable and I get an error in the log. I've tried to reconnect by uninstalling and install again but nothing change. I don't really understand the meaning of the log. M'y configuration in yaml is exactly the same that python file gave to me. Thanks!

Reproduction steps

  1. Install tgtg integration
  2. Configure in configuration.yaml

...

Debug logs

Logger: homeassistant.components.sensor
Source: custom_components/tgtg/sensor.py:78
Integration: Capteur (documentation, issues)
First occurred: 19:38:37 (1 occurrences)
Last logged: 19:38:37

Error while setting up tgtg platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 293, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/tgtg/sensor.py", line 78, in setup_platform
    tgtgReply = tgtg_client.get_items()
  File "/usr/local/lib/python3.10/site-packages/tgtg/__init__.py", line 240, in get_items
    self.login()
  File "/usr/local/lib/python3.10/site-packages/tgtg/__init__.py", line 149, in login
    self._refresh_token()
  File "/usr/local/lib/python3.10/site-packages/tgtg/__init__.py", line 135, in _refresh_token
    raise TgtgAPIError(response.status_code, response.content)
tgtg.exceptions.TgtgAPIError: (403, b'{"url":"https://geo.captcha-delivery.com/captcha/?initialCid=AHrlqAAAAAMA1YnS04aHwZMA_5ewAw==&cid=1Jii7ZI_jXQxjr-XZRQ9OBcVRQxkH6ou81BsZMRZUEVTUWoJNfVuflue-oAzS-lbS2~Os5Y1~I91WQ-1gXmQ_zc2UaOAjwQsBTUp-2to8510PupRnRcj7c3OV-1mUOfy&referer=https%3A%2F%2Fapptoogoodtogo.com%2Fapi%2Fauth%2Fv3%2Ftoken%2Frefresh&hash=1D42C2CA6131C526E09F294FE96F94&t=fe&s=35558&e=4556d843f49a065b85ed7f6a8988a29c3c1e23d27bb436b5af7bcf65b71f8fec"}')

Diagnostics dump

No response

tjorim commented

Can you check if release https://github.com/Chouffy/home_assistant_tgtg/releases/tag/5.2.0 fixes this? Maybe Too good to go migrated some users earlier to the new version of their API.

Will try this when I'll be AT home. Thanks !

Hi @matat60 , any news ? :)

Yes, sorry it seems to be fixed now, I just try again few weeks later.