Closed mikeage closed 2 months ago
FWIW, 0.0.31 was also broken for me, with a different error (I don't care about this, but just for helping to figure out when it happened):
2024-08-21 05:33:55.441 ERROR (MainThread) [custom_components.iec.coordinator] Unexpected error fetching Iec data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 312, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/iec/coordinator.py", line 423, in _async_update_data
total_kva_price, estimated_kwh_consumption = await self._estimate_bill(contract_id, device.device_number,\
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/iec/coordinator.py", line 640, in _estimate_bill
if not is_private_producer or not last_meter_read:
^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'last_meter_read' where it is not associated with a value
I've gone back to 0.0.30 for now
@mikeage try with 0.0.33
(currently in Pre-Release)
Looks good (there's a new exception that I didn't remember from before, but it's not relevant). I'll open a new issue for that one. Edit: #161
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4818 Installed Version | 1.34.0 Stage | running Available Repositories | 1400 Downloaded Repositories | 25AccuWeather
can_reach_server | ok -- | -- remaining_requests | 38Dashboards
dashboards | 2 -- | -- resources | 14 views | 14 mode | storageRecorder
oldest_recorder_run | August 6, 2024 at 6:42 PM -- | -- current_recorder_run | August 21, 2024 at 5:19 AM estimated_db_size | 636.64 MiB database_engine | mysql database_version | 10.11.9Checklist
Describe the issue
Note that I current pay for electricity from Pazgas, if that matters.
Reproduction steps
Debug logs
Diagnostics dump
No response