Closed simphide closed 8 months ago
If I see it correctly the item_price gets determined from the field ["item"]["price_including_taxes"]["minor_units"]
if "price_including_taxes" in self.tgtg_answer["item"]:
data[ATTR_PRICE] = (
str(
int(
self.tgtg_answer["item"]["price_including_taxes"][
"minor_units"
]
)
/ pow(
10,
int(
self.tgtg_answer["item"]["price_including_taxes"][
"decimals"
]
),
)
)
+ " "
+ self.tgtg_answer["item"]["price_including_taxes"]["code"]
)
Looking at the raw response from the TGTG library it should be ["item"]["item_price"]["minor_units"].
Thank you for the information, the API must have changed. It could be helpful for people to also report upstream. Their readme still mentions price_including_taxes
as well: https://github.com/ahivert/tgtg-python/blob/master/README.md.
I have created a pull request. Thank you for the fast feedback!
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4817 Installed Version | 1.33.0 Stage | running Available Repositories | 1367 Downloaded Repositories | 27AccuWeather
can_reach_server | ok -- | -- remaining_requests | 22Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okDashboards
dashboards | 5 -- | -- resources | 17 views | 25 mode | storageRecorder
oldest_recorder_run | December 6, 2023 at 8:07 PM -- | -- current_recorder_run | January 5, 2024 at 2:16 PM estimated_db_size | 718.14 MiB database_engine | mysql database_version | 11.2.2Spotify
api_endpoint_reachable | ok -- | --Checklist
Describe the issue
I am getting an error, that no item price is returned anymore (also see the following screenshot):
I have already genrated a new token and have restarted home assistant but the attribute is still missing.
Reproduction steps
Debug logs
Diagnostics dump
No response