home-assistant_OctopusAgile
home-assistant_OctopusAgile copied to clipboard
Only some data being filled
Im having some success getting data, some fields are missing:
Any suggestions on what might be the cause? Thanks
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
Today I got data, but the rates aren't correct:
I have cleared the Gorate fields:
I left an HA instance running all day, and have come back to find the card populated with rates that look correct for region A
Not sure why some rates are showing 1 dp and some 2, but it's way better than 'Unknown'...
This is a known feature, the way in which the rates populate can take a while to get going.