New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API returns 404 #102
Comments
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 |
This is not a fix. This is hack to ignore orders. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
System Health details
System Information
Home Assistant Community Store
Home Assistant Cloud
Dashboards
Recorder
Checklist
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.
The text was updated successfully, but these errors were encountered: