Skip to content
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

Latest commits cause error in DailyUsageSensor #33

Open
zoopster opened this issue Aug 29, 2022 · 0 comments
Open

Latest commits cause error in DailyUsageSensor #33

zoopster opened this issue Aug 29, 2022 · 0 comments

Comments

@zoopster
Copy link

I updated late last week and reset the configuration. It generally works and works well. I'd love to fix these, but they are well over my skill set in python.

in the HASS logs I see the last line in a traceback

File "/config/custom_components/fpl/sensor_DailyUsageSensor.py", line 58, in last_reset
date = data[-1]["readTime"]
TypeError: 'NoneType' object is not subscriptable

and then just afterwards I get
2022-08-29 08:51:19.306 ERROR (MainThread) [custom_components.fpl] Error fetching fpl data:

But I'm not sure how related they are...

The full set of logs around it...
2022-08-29 08:24:27.554 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
2022-08-29 08:24:27.555 ERROR (MainThread) [homeassistant] Error doing job: Unclosed connector
2022-08-29 08:31:14.590 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 151, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 532, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 572, in _async_write_ha_state
attr.update(self.state_attributes or {})
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 326, in state_attributes
if last_reset := self.last_reset:
File "/config/custom_components/fpl/sensor_DailyUsageSensor.py", line 58, in last_reset
date = data[-1]["readTime"]
TypeError: 'NoneType' object is not subscriptable
2022-08-29 08:39:27.538 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
2022-08-29 08:39:27.540 ERROR (MainThread) [homeassistant] Error doing job: Unclosed connector
2022-08-29 08:51:19.306 ERROR (MainThread) [custom_components.fpl] Error fetching fpl data:
2022-08-29 08:54:27.629 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
2022-08-29 08:54:27.631 ERROR (MainThread) [homeassistant] Error doing job: Unclosed connector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant