Chouffy / home_assistant_tgtg

TooGoodToGo items stock as sensor in Home Assistant
MIT License
65 stars 18 forks source link

Unavailable sensors also not getting id #77

Closed LoetkolbenLukas closed 1 year ago

LoetkolbenLukas commented 1 year ago

System Health details

System Information

version core-2023.5.2
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.10.11
os_name Linux
os_version 5.19.0-41-generic
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4993 Installed Version | 1.32.1 Stage | running Available Repositories | 1289 Downloaded Repositories | 21 HACS Data | ok
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Dashboards dashboards | 4 -- | -- resources | 14 views | 7 mode | storage
Recorder oldest_recorder_run | May 1, 2023 at 1:00 PM -- | -- current_recorder_run | May 10, 2023 at 6:10 PM estimated_db_size | 115.11 MiB database_engine | sqlite database_version | 3.40.1

Checklist

Describe the issue

Hello Chouffy, first of all thank you so much for your great integration! My girlfriend and I are very happy about getting a chance with the bags now :D

Unfortunately there is something weird happening now with some sensors of mine. I had it configured without any special item IDs in the config and some sensors started showing as "unavailable". I got a new token from your script and replaced the old one in my config, but the result was the same. Next i tried the method of getting the item IDs through your script, but unfortunately the "unavalable" sensors didn't show up in the list:

item:

ERGO Gourmet - Nürnberg (Mittag (VYTAL Mehrwegsystem))

-  980868
# Bean's coffee & more
-  52430
# Grand Zhang (Sushi Abends)
-  763621
# Grand Zhang (Buffet Abends)
-  755005
# 994 GINZA - Sushi | Izakaya (Überraschungstüte)
-  834205
# 994 GINZA - Sushi | Izakaya (Überraschungstüte (Groß))
-  841690
# Der Beck - Schwabacher Straße
-  344514
# Aral mit REWE To Go - Herrnstraße 27 Fürth (Vegetarisches Mittagsangebot)
-  849914
# Galeria Markthalle   - Nürnberg (Obst & Gemüse)
-  807027
# Flink   - Fürth (Obst und Gemüse)
-  827081
# Flink   - Fürth (Ready to Eat)
-  685116
# Flink   - Fürth (Überraschungstüte)
-  685114
# Früchte Fürther Freiheit
-  587630
# Flink - Johannis (Obst und Gemüse)
-  831828
# Aral mit REWE To Go - Nürnberger Straße 131 Fürth (Abendangebot)
-  835539
# Aral mit REWE To Go - Nürnberger Straße 126 Fürth (Abendangebot)
-  840710
# Kantine Wolke 7 (Überraschungstüte)
-  1046693
# Kantine Wolke 7 (Vegetarische Überraschungstüte)
-  1050321
# E center Schuler - Fürth (Obst & Gemüse)
-  463
# Suppenkaspar Fürth
-  342765

In the Screenshot you can see, that the missing IDs match the unavailable sensors.

tgtg_bug

In this screenshot you can see, that the item exists in the Tgtg App and was even available today, which it hasn't been in homeassistant for some time.

tgtg_krumelchen

Dropping the homeassistant.log here: homeassistant.log

Reproduction steps

  1. Install the tgtg integration via Hacs as instructed in the readme
  2. Try to get item ids through the script
  3. Only get the ones that are also available in HomeAssistant

I am not sure what else might be relevant as I didn't really do anything out of the ordinary.

Debug logs

Github told me this comment was too long, so i appended the debug log to the issue.

Diagnostics dump

No response

Cafun commented 1 year ago

+1 After updating HA to 2023.5.4 (from 2023.4.6),sensors are unavailable.

bartek75 commented 1 year ago

Home Assistant 2023.5.4 Supervisor 2023.04.1 Operating System 10.1 Frontend 20230503.3 - latest , sensors are unavailable.

tjorim commented 1 year ago

Too good to go updated their API. Release https://github.com/Chouffy/home_assistant_tgtg/releases/tag/5.2.0 should fix it.

LoetkolbenLukas commented 1 year ago

I updated to the new version and restarted, but unfortunately it wasn't fixed for me. I then generated a new token and restarted, but still no difference. I tried to generate the item ids but was greeted with a failed captcha attempt like in issue #80