We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ee9898 commit efd6b97Copy full SHA for efd6b97
custom_components/iec/coordinator.py
@@ -469,7 +469,16 @@ async def _async_update_data(
469
remote_reading.future_consumption_info
470
)
471
472
- daily_readings[device.device_number] = remote_reading.data
+ if remote_reading and remote_reading.data:
473
+ daily_readings[device.device_number] = remote_reading.data
474
+ else:
475
+ _LOGGER.warning(
476
+ "No Monthly readings returned for device %s in contract %s on %s",
477
+ device.device_number,
478
+ contract_id,
479
+ localized_today.strftime("%Y-%m-%d"),
480
+ )
481
+ daily_readings[device.device_number] = []
482
483
weekly_future_consumption = None
484
if localized_today.day == 1:
0 commit comments