-
Notifications
You must be signed in to change notification settings - Fork 11
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
KeyError: 'price' #18
Comments
for me it is the CircleK sensor that are not updating
|
The fuel name has change at circleK, add a "." after the name and it is working FUEL_COMPANIES = {
"circlek": {
"name": "Circle K",
"url": "https://www.circlek.dk/priser",
"products": {
OCTANE_95: {"name": "miles95."},
OCTANE_95_PLUS: {"name": "milesPLUS95."},
DIESEL: {"name": "miles Diesel B7."},
DIESEL_PLUS: {"name": "milesPLUS Diesel."},
ELECTRIC: {"name": "El Lynlader."}, |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In HA 2023.5.2 I get the following errors in the log (sensors are not updated):
First occurred: 8. maj 2023 kl. 13.29.09 (32 occurrences)
Last logged: 21.44.45
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 204, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/fuelprices_dk/sensor.py", line 91, in state
return float(self._fuelCompany.getProductPrice(self._productKey))
File "/config/custom_components/fuelprices_dk/fuelprices_dk_api.py", line 215, in getProductPrice
return self._products[productKey]["price"]
KeyError: 'price'
The text was updated successfully, but these errors were encountered: