Open skinkie opened 7 months ago
With some hacking I disabled the orders in two places. That allows for starting the integration.
So, I'm currious.. What did you do to make it work again?
--- sensor.py
+++ /home/skinkie/.homeassistant/custom_components/tgtg/sensor.py
@@ -188,6 +188,7 @@
orders_placed = 0
total_quantity_ordered = 0
+ """
for order in self.tgtg_orders:
if "item_id" in order:
if order["item_id"] == str(self.item_id):
@@ -198,6 +199,7 @@
data[ATTR_PICKUP_WINDOW_CHANGED] = order["pickup_window_changed"]
if "cancel_until" in order:
data[ATTR_CANCEL_UNTIL] = order["cancel_until"]
+ """
data[ATTR_ORDERS_PLACED] = orders_placed
if total_quantity_ordered > 0:
data[ATTR_TOTAL_QUANTITY_ORDERED] = total_quantity_ordered
@@ -209,7 +211,7 @@
"""
global tgtg_client
self.tgtg_answer = tgtg_client.get_item(item_id=self.item_id)
- self.tgtg_orders = tgtg_client.get_active()["orders"]
+ # self.tgtg_orders = tgtg_client.get_active()["orders"]
self.store_name = self.tgtg_answer["display_name"]
self.item_qty = self.tgtg_answer["items_available"]
Can you submit this as a PR? That would help everyone
Can you submit this as a PR? That would help everyone
This is not a fix. This is hack to ignore orders.
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4915 Installed Version | 1.33.0 Stage | running Available Repositories | 1379 Downloaded Repositories | 5Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okDashboards
dashboards | 1 -- | -- resources | 1 views | 5 mode | storageRecorder
oldest_recorder_run | January 11, 2024 at 9:17 AM -- | -- current_recorder_run | January 18, 2024 at 10:10 AM estimated_db_size | 580.99 MiB database_engine | sqlite database_version | 3.44.2Checklist
Describe the issue
TGTG api returns 404
Reproduction steps
Debug logs
Diagnostics dump
I guess if it fails to start you cannot reach this point.