Only some data being filled
usbrit opened this issue · 4 comments
I'm seeing more-or-less the same thing. Current, next and previous are all showing as 'Unknown'.
This is on a fresh install of HA2022.10.3
Looking at the logs, I see:
2022-10-12 22:36:05.572 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.octopus_agile_previous_rate fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
raise exc
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/octopusagile/sensor.py", line 88, in update
prev_rate = self.hass.states.get("octopusagile.all_rates").attributes.get(rounded_time_str)
AttributeError: 'NoneType' object has no attribute 'attributes'
2022-10-12 22:36:05.601 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.octopus_agile_current_rate fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
raise exc
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/octopusagile/sensor.py", line 159, in update
current_rate = self.hass.states.get("octopusagile.all_rates").attributes.get(rounded_time_str)
AttributeError: 'NoneType' object has no attribute 'attributes'
2022-10-12 22:36:05.794 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.octopus_agile_next_rate fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 515, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 710, in async_device_update
raise exc
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/octopusagile/sensor.py", line 227, in update
next_rate = self.hass.states.get("octopusagile.all_rates").attributes.get(rounded_time_str)
AttributeError: 'NoneType' object has no attribute 'attributes'
Any ideas how to get this working?
Many thanks
Steve
This is a known feature, the way in which the rates populate can take a while to get going.