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

Energy dashboard displays incorrects statistics in 2023.10.1 (after daily restart at 4am) #101613

Closed
justinmaiuto opened this issue Oct 7, 2023 · 25 comments · Fixed by #101616
Closed

Comments

@justinmaiuto
Copy link

justinmaiuto commented Oct 7, 2023

The problem

image
image
image

having an issue on 2023.10.0 and 2023.10.1

I restart HA each day and the issue seems to be in the first hour since restart. Also, the $ calculations seem fine even though the stats are crazy

My energy dashboard is fed by these:
image
image

What version of Home Assistant Core has the issue?

2023.10.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@justinmaiuto
Copy link
Author

@bdraco

@bdraco
Copy link
Member

bdraco commented Oct 7, 2023

The problem

image image

Can you explain a bit more what these images are showing? There isn't enough context to figure out what they are.

@justinmaiuto
Copy link
Author

The large spikes at 4am are all inaccurate data, highly inflated. The summary percentages also inaccurately high as a result.

This is a normal day prior to the update to 2023.10.1:
image

@bdraco
Copy link
Member

bdraco commented Oct 7, 2023

You mention you restart every day. Are you restarting at 4am every day?

@justinmaiuto
Copy link
Author

yes

@bdraco
Copy link
Member

bdraco commented Oct 7, 2023

That seems like we have a bug in the catch up code.

Please turn on debug logging for homeassistant.components.recorder

# Example configuration.yaml entry
logger:
  default: info
  logs:
    homeassistant.components.recorder: debug

Check the log tomorrow to see if Compiling missing statistics for appears in the log

@justinmaiuto
Copy link
Author

will do

@bdraco
Copy link
Member

bdraco commented Oct 7, 2023

Assuming its a problem with catching up stats, #101616 might fix it. But I still haven't been able to actually replicate the issue so its just a guess.

@bdraco bdraco changed the title Energy dashboard displays incorrects statistics in 2023.10.1 Energy dashboard displays incorrects statistics in 2023.10.1 (after daily restart at 4am) Oct 7, 2023
@bdraco
Copy link
Member

bdraco commented Oct 7, 2023

I'm starting to think this is an existing issue that is now more likely to happen based on previous reports.

Unfortunately we didn't find the source of the old reports and those issues went stale. It seems like its easier to replicate now but we still don't have replication steps that can be done programmatically to be able to solve the issue. I also can't replicate the issue on > 10 production instances so its a lot of guess work about whats actually going wrong.

We don't have good test coverage for compile_missing_statistics so if thats the source of the bad data, it would be good to add lots of coverage there first

@justinmaiuto
Copy link
Author

I'm starting to think this is an existing issue that is now more likely to happen based on previous reports.

Unfortunately we didn't find the source of the old reports and those issues went stale. It seems like its easier to replicate now but we still don't have replication steps that can be done programmatically to be able to solve the issue. I also can't replicate the issue on > 10 production instances so its a lot of guess work about whats actually going wrong.

We don't have good test coverage for compile_missing_statistics so if thats the source of the bad data, it would be good to add lots of coverage there first

is there something you would like me to do based on this comment?

@bdraco
Copy link
Member

bdraco commented Oct 7, 2023

is there something you would like me to do based on this comment?

Nope. Just adding notes here so I don't forget when I have more time to dig into this

@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

That was quite the rabbit hole.

After ~18 hours of digging though the code I'm pretty sure I've found the issue

I think #101616 should fix it.

@justinmaiuto
Copy link
Author

Awesome! Will you need logs from me still?

@drobtravels
Copy link
Contributor

I'm seeing the same issue. It started in 2023.09.x (not sure which one but not 0). I use the IotAWatt integration and also restart at 4am everyday for backup.

Happy to help test, etc

@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

Awesome! Will you need logs from me still?

Yes please. I want to confirm we are fixing the right problem

@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

I'm seeing the same issue. It started in 2023.09.x (not sure which one but not 0). I use the IotAWatt integration and also restart at 4am everyday for backup.

Happy to help test, etc

@drobtravels
Thanks, the linked PR should be ready for testing.

It looks like this have been a problem for months, maybe years?

It seems its more likely to happen with 2023.10.x due to some performance improvements that change the timings

@justinmaiuto
Copy link
Author

Interesting that the issues only started for me with 2023.10.0 and 2023.10.1. I'll grab some logs

@justinmaiuto
Copy link
Author

justinmaiuto commented Oct 8, 2023

These seem to be the most relevant logs after startup. Is there something I should be looking for specifically?

2023-10-09 04:13:31.067 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Created new connection <sqlite3.Connection object at 0x7f8256f56e30>
2023-10-09 04:13:31.070 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:13:31.074 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:13:31.074 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:13:31.074 DEBUG (Recorder) [homeassistant.components.recorder.core] Connected to recorder database
2023-10-09 04:13:31.075 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:13:31.079 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:13:31.079 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:13:31.080 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:13:31.080 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:13:31.081 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:13:31.081 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:13:31.210 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:13:31.210 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:13:31.212 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:13:31.575 DEBUG (Recorder) [homeassistant.components.recorder.core] Activating event_types manager as all data is migrated
2023-10-09 04:13:31.744 DEBUG (Recorder) [homeassistant.components.recorder.core] Activating states_meta manager as all data is migrated
2023-10-09 04:13:31.746 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:13:31.746 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return

2023-10-09 04:14:47.465 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=recorder, service=purge>)
2023-10-09 04:14:47.467 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=recorder, service=purge_entities>)
2023-10-09 04:14:47.467 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=recorder, service=enable>)
2023-10-09 04:14:47.467 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=recorder, service=disable>)
2023-10-09 04:14:47.467 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventIdMigrationTask()
2023-10-09 04:14:47.538 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:14:47.538 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:14:47.538 DEBUG (Recorder) [homeassistant.components.recorder.migration] Cleanup legacy entity_ids
2023-10-09 04:14:47.539 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:14:47.548 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:14:47.548 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:14:47.548 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=recorder>)
2023-10-09 04:14:47.548 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=webhook>)
2023-10-09 04:14:47.548 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=network>)
2023-10-09 04:14:47.549 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=usb>)
2023-10-09 04:14:47.549 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=dhcp>)
2023-10-09 04:14:47.549 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=zeroconf>)
2023-10-09 04:14:47.549 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=bluetooth>)
2023-10-09 04:14:47.549 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=cloud, service=remote_connect>)
2023-10-09 04:14:47.550 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=cloud, service=remote_disconnect>)
2023-10-09 04:14:47.550 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=ssdp>)
2023-10-09 04:14:47.550 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=cloud>)
2023-10-09 04:14:47.550 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=conversation, service=process>)
2023-10-09 04:14:47.550 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=conversation, service=reload>)
2023-10-09 04:14:47.550 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=localtuya, service=reload>)
2023-10-09 04:14:47.551 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=localtuya, service=set_dp>)
2023-10-09 04:14:47.551 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event panels_updated[L]>)
2023-10-09 04:14:47.551 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=conversation>)
2023-10-09 04:14:47.551 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=wake_word>)
2023-10-09 04:14:47.551 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=history>)
2023-10-09 04:14:47.551 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=trace>)
2023-10-09 04:14:47.551 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=blueprint>)
2023-10-09 04:14:47.552 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=homeassistant_alerts>)
2023-10-09 04:14:47.552 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=stt>)
2023-10-09 04:14:47.552 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event panels_updated[L]>)
2023-10-09 04:14:47.552 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=logbook, service=log>)
2023-10-09 04:14:47.552 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event panels_updated[L]>)
2023-10-09 04:14:47.552 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event component_loaded[L]: component=hardware>)
2023-10-09 04:14:47.553 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event panels_updated[L]>)
2023-10-09 04:14:47.553 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event panels_updated[L]>)
2023-10-09 04:14:47.553 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=input_select, service=reload>)
2023-10-09 04:14:47.553 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=input_select, service=select_first>)
2023-10-09 04:14:47.553 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=input_select, service=select_last>)
2023-10-09 04:14:47.553 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=input_select, service=select_next>)
2023-10-09 04:14:47.553 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=input_select, service=select_option>)
2023-10-09 04:14:47.554 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=input_select, service=select_previous>)
2023-10-09 04:14:47.554 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event service_registered[L]: domain=input_select, service=set_options>)


2023-10-09 04:14:47.626 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.co2_signal_co2_intensity, old_state=None, new_state=<state sensor.co2_signal_co2_intensity=716; state_class=measurement, country_code=AU-VIC, unit_of_measurement=gCO2eq/kWh, attribution=Data provided by Electricity Maps, icon=mdi:molecule-co2, friendly_name=Electricity Maps CO2 intensity @ 2023-10-09T04:14:33.113209+11:00>>)
2023-10-09 04:14:47.627 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.co2_signal_grid_fossil_fuel_percentage, old_state=None, new_state=<state sensor.co2_signal_grid_fossil_fuel_percentage=87.07; state_class=measurement, country_code=AU-VIC, unit_of_measurement=%, attribution=Data provided by Electricity Maps, icon=mdi:molecule-co2, friendly_name=Electricity Maps Grid fossil fuel percentage @ 2023-10-09T04:14:33.113568+11:00>>)
2023-10-09 04:14:47.627 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_production_today, old_state=None, new_state=<state sensor.energy_production_today=24.473; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (8kw north facing) Estimated energy production - today @ 2023-10-09T04:14:33.116448+11:00>>)
2023-10-09 04:14:47.627 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_production_today_remaining, old_state=None, new_state=<state sensor.energy_production_today_remaining=24.473; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (8kw north facing) Estimated energy production - remaining today @ 2023-10-09T04:14:33.116936+11:00>>)
2023-10-09 04:14:47.628 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_production_tomorrow, old_state=None, new_state=<state sensor.energy_production_tomorrow=23.999; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (8kw north facing) Estimated energy production - tomorrow @ 2023-10-09T04:14:33.117243+11:00>>)
2023-10-09 04:14:47.628 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.power_highest_peak_time_today, old_state=None, new_state=<state sensor.power_highest_peak_time_today=2023-10-09T02:00:00+00:00; device_class=timestamp, friendly_name=Home solar production forecast (8kw north facing) Highest power peak time - today @ 2023-10-09T04:14:33.117548+11:00>>)
2023-10-09 04:14:47.628 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.power_highest_peak_time_tomorrow, old_state=None, new_state=<state sensor.power_highest_peak_time_tomorrow=2023-10-10T03:00:00+00:00; device_class=timestamp, friendly_name=Home solar production forecast (8kw north facing) Highest power peak time - tomorrow @ 2023-10-09T04:14:33.117837+11:00>>)
2023-10-09 04:14:47.628 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.power_production_now, old_state=None, new_state=<state sensor.power_production_now=0; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Home solar production forecast (8kw north facing) Estimated power production - now @ 2023-10-09T04:14:33.118117+11:00>>)
2023-10-09 04:14:47.629 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_current_hour, old_state=None, new_state=<state sensor.energy_current_hour=0.0; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (8kw north facing) Estimated energy production - this hour @ 2023-10-09T04:14:33.118735+11:00>>)
2023-10-09 04:14:47.629 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_next_hour, old_state=None, new_state=<state sensor.energy_next_hour=0.0; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (8kw north facing) Estimated energy production - next hour @ 2023-10-09T04:14:33.119010+11:00>>)
2023-10-09 04:14:47.629 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_production_today_2, old_state=None, new_state=<state sensor.energy_production_today_2=11.642; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (4kw east facing) Estimated energy production - today @ 2023-10-09T04:14:33.120064+11:00>>)
2023-10-09 04:14:47.630 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_production_today_remaining_2, old_state=None, new_state=<state sensor.energy_production_today_remaining_2=11.642; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (4kw east facing) Estimated energy production - remaining today @ 2023-10-09T04:14:33.120384+11:00>>)
2023-10-09 04:14:47.630 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_production_tomorrow_2, old_state=None, new_state=<state sensor.energy_production_tomorrow_2=12.08; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (4kw east facing) Estimated energy production - tomorrow @ 2023-10-09T04:14:33.120873+11:00>>)
2023-10-09 04:14:47.630 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.power_highest_peak_time_today_2, old_state=None, new_state=<state sensor.power_highest_peak_time_today_2=2023-10-09T02:00:00+00:00; device_class=timestamp, friendly_name=Home solar production forecast (4kw east facing) Highest power peak time - today @ 2023-10-09T04:14:33.121151+11:00>>)
2023-10-09 04:14:47.630 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.power_highest_peak_time_tomorrow_2, old_state=None, new_state=<state sensor.power_highest_peak_time_tomorrow_2=2023-10-10T00:00:00+00:00; device_class=timestamp, friendly_name=Home solar production forecast (4kw east facing) Highest power peak time - tomorrow @ 2023-10-09T04:14:33.121420+11:00>>)
2023-10-09 04:14:47.630 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.power_production_now_2, old_state=None, new_state=<state sensor.power_production_now_2=0; state_class=measurement, unit_of_measurement=W, device_class=power, friendly_name=Home solar production forecast (4kw east facing) Estimated power production - now @ 2023-10-09T04:14:33.121677+11:00>>)
2023-10-09 04:14:47.631 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_current_hour_2, old_state=None, new_state=<state sensor.energy_current_hour_2=0.0; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (4kw east facing) Estimated energy production - this hour @ 2023-10-09T04:14:33.122270+11:00>>)
2023-10-09 04:14:47.631 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.energy_next_hour_2, old_state=None, new_state=<state sensor.energy_next_hour_2=0.0; unit_of_measurement=kWh, device_class=energy, friendly_name=Home solar production forecast (4kw east facing) Estimated energy production - next hour @ 2023-10-09T04:14:33.122538+11:00>>)
2023-10-09 04:14:47.631 DEBUG (Recorder) [homeassistant.components.recorder.core] Processing task: EventTask(event=<Event state_changed[L]: entity_id=sensor.import_supply_charge, old_state=None, new_state=<state sensor.import_supply_charge=unknown; state_class=total_increasing, unit_of_measurement=kWh, device_class=energy, friendly_name=Import Supply Charge @ 2023-10-09T04:14:33.125568+11:00>>)

@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

I don't see a stats catch up task in your logs. Did the problem happen after that restart ?

@justinmaiuto
Copy link
Author

Yep, problem is still there. Should I search the log for a specific term? "Catchup"?

@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

You should see something like DEBUG:homeassistant.components.recorder.statistics:Compiling missing statistics for 2021-01-02 00:05:00+00:00-2021-01-02 00:10:00+00:00

@justinmaiuto
Copy link
Author

justinmaiuto commented Oct 8, 2023

2023-10-09 04:14:56.900 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:14:56.900 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:14:56.902 DEBUG (Recorder) [homeassistant.components.recorder.statistics] Statistics for sensor during 2023-10-08 17:00:00+00:00-2023-10-08 17:05:00+00:00: [{'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.co2_signal_co2_intensity', 'unit_of_measurement': 'gCO2eq/kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 716.0, 'min': 686.0, 'mean': 715.2829182}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.co2_signal_grid_fossil_fuel_percentage', 'unit_of_measurement': '%'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 87.07, 'min': 83.26, 'mean': 86.9789276269}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.power_production_now', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.power_production_now_2', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.import_supply_charge', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 5.4559999999999995, 'state': 16.744}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bedroom_sensor_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 16.3, 'min': 16.2, 'mean': 16.293159866000003}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bedroom_sensor_humidity', 'unit_of_measurement': '%'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 54.4, 'min': 54.3, 'mean': 54.306840253}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.loungeroom_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 20.2, 'min': 20.2, 'mean': 20.2}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_sensor_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 16.7, 'min': 16.7, 'mean': 16.7}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_sensor_humidity', 'unit_of_measurement': '%'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 54.2, 'min': 54.2, 'mean': 54.2}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.wirelesstag_spa_temperature_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 9.8, 'min': 9.8, 'mean': 9.8}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.wirelesstag_pool_temperature_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 11.2, 'min': 11.2, 'mean': 11.2}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.homekit_91000hku22a50161_import_cost', 'unit_of_measurement': 'AUD'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'last_reset': datetime.datetime(2023, 10, 8, 13, 6, 27, 121916, tzinfo=datetime.timezone.utc), 'sum': 1657.426439799988, 'state': 0.514813299999998}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.import_supply_charge_cost', 'unit_of_measurement': 'AUD'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'last_reset': datetime.datetime(2023, 10, 8, 6, 0, 15, 239934, tzinfo=datetime.timezone.utc), 'sum': 226.25526640000828, 'state': 0.479819999999966}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.homekit_91000hku22a50161_export_compensation', 'unit_of_measurement': 'AUD'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'last_reset': datetime.datetime(2023, 10, 8, 13, 0, 14, 114833, tzinfo=datetime.timezone.utc), 'sum': 210.2052800000012, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.watchman_missing_entities', 'unit_of_measurement': 'items'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 56.0, 'min': 51.0, 'mean': 55.67995547666667}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.watchman_missing_services', 'unit_of_measurement': 'items'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.inverter_5010kmst22bw0458_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 46.5, 'state': 8093.1}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.homekit_91000hku22a50161_import', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 17.29000000000001, 'state': 2.27}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.homekit_91000hku22a50161_export', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 33.87, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 199.8935833333319, 'state': 6.0642}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 5.7935999999999686, 'state': 0.173833333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 12.381683333333198, 'state': 0.0424833333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 14.36048333333325, 'state': 0.0753833333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 3.6628000000000043, 'state': 0.116183333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 6.69096666666664, 'state': 0.283483333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 1.1128666666666671, 'state': 0.00728333333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 68.15033333336032, 'state': 2.21616666666667}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 132.38841666666607, 'state': 2.57721666666667}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.study_lights_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.study_lights_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 3.182800000000065, 'state': 1.7482}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 31.79376666666685, 'state': 0.2876}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 12.483099999999805, 'state': 0.144583333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.alfresco_deck_lights_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.alfresco_deck_lights_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.915483333333334, 'state': 0.0104333333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 5.418833333333312, 'state': 0.153816666666667}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.valentina_room_lights_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.valentina_room_lights_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.8793000000000064, 'state': 0.462083333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_power_2', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_energy_2', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.today_s_pv_generation', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 7981.4000000009855, 'state': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.total_pv_generation', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 0, tzinfo=datetime.timezone.utc), 'sum': 8083.1, 'state': 8093.1}}]
2023-10-09 04:14:56.908 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:14:56.971 DEBUG (Recorder) [homeassistant.components.recorder.statistics] Compiling missing statistics for 2023-10-08 17:05:00+00:00-2023-10-08 17:10:00+00:00
2023-10-09 04:14:56.972 DEBUG (Recorder) [homeassistant.components.recorder.statistics] Compiling statistics for 2023-10-08 17:05:00+00:00-2023-10-08 17:10:00+00:00
2023-10-09 04:14:57.012 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:14:57.012 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return
2023-10-09 04:14:57.013 DEBUG (Recorder) [homeassistant.components.recorder.statistics] Statistics for sensor during 2023-10-08 17:05:00+00:00-2023-10-08 17:10:00+00:00: [{'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.co2_signal_co2_intensity', 'unit_of_measurement': 'gCO2eq/kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 716.0, 'min': 716.0, 'mean': 716.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.co2_signal_grid_fossil_fuel_percentage', 'unit_of_measurement': '%'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 87.07, 'min': 87.07, 'mean': 87.07}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.import_supply_charge', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 5.4559999999999995, 'state': 16.744}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bedroom_sensor_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 16.3, 'min': 16.3, 'mean': 16.3}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bedroom_sensor_humidity', 'unit_of_measurement': '%'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 54.3, 'min': 54.3, 'mean': 54.3}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.loungeroom_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 20.2, 'min': 20.2, 'mean': 20.2}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_sensor_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 16.7, 'min': 16.7, 'mean': 16.7}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_sensor_humidity', 'unit_of_measurement': '%'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 54.2, 'min': 54.2, 'mean': 54.2}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.wirelesstag_spa_temperature_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 9.8, 'min': 9.8, 'mean': 9.8}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.wirelesstag_pool_temperature_temperature', 'unit_of_measurement': '°C'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 11.2, 'min': 11.2, 'mean': 11.2}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.homekit_91000hku22a50161_import_cost', 'unit_of_measurement': 'AUD'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'last_reset': datetime.datetime(2023, 10, 8, 13, 6, 27, 121916, tzinfo=datetime.timezone.utc), 'sum': 1657.426439799988, 'state': 0.514813299999998}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.import_supply_charge_cost', 'unit_of_measurement': 'AUD'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'last_reset': datetime.datetime(2023, 10, 8, 6, 0, 15, 239934, tzinfo=datetime.timezone.utc), 'sum': 226.25526640000828, 'state': 0.479819999999966}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.homekit_91000hku22a50161_export_compensation', 'unit_of_measurement': 'AUD'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'last_reset': datetime.datetime(2023, 10, 8, 13, 0, 14, 114833, tzinfo=datetime.timezone.utc), 'sum': 210.2052800000012, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.watchman_missing_entities', 'unit_of_measurement': 'items'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 56.0, 'min': 56.0, 'mean': 56.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.watchman_missing_services', 'unit_of_measurement': 'items'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bungalow_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 199.8935833333319, 'state': 6.0642}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 5.7935999999999686, 'state': 0.173833333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_entrance_toilet_light_and_fan_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 12.381683333333198, 'state': 0.0424833333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.front_outdoor_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 14.36048333333325, 'state': 0.0753833333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 3.6628000000000043, 'state': 0.116183333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.bathroom_main_light_and_fan_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 6.69096666666664, 'state': 0.283483333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 1.1128666666666671, 'state': 0.00728333333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.server_room_light_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 68.15033333336032, 'state': 2.21616666666667}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.kitchen_lights_1_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 132.38841666666607, 'state': 2.57721666666667}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.study_lights_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.study_lights_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 3.182800000000065, 'state': 1.7482}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_1_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_1_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 31.79376666666685, 'state': 0.2876}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_1_and_garden_lights_channel_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 12.483099999999805, 'state': 0.144583333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.alfresco_deck_lights_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.alfresco_deck_lights_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.915483333333334, 'state': 0.0104333333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_2_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.rear_outdoor_eave_lights_2_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 5.418833333333312, 'state': 0.153816666666667}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.valentina_room_lights_power', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.valentina_room_lights_energy', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.8793000000000064, 'state': 0.462083333333333}}, {'meta': {'has_mean': True, 'has_sum': False, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_power_2', 'unit_of_measurement': 'W'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'max': 0.0, 'min': 0.0, 'mean': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.unused_energy_2', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 0.0, 'state': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.today_s_pv_generation', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 7981.4000000009855, 'state': 0.0}}, {'meta': {'has_mean': False, 'has_sum': True, 'name': None, 'source': 'recorder', 'statistic_id': 'sensor.total_pv_generation', 'unit_of_measurement': 'kWh'}, 'stat': {'start': datetime.datetime(2023, 10, 8, 17, 5, tzinfo=datetime.timezone.utc), 'sum': 8083.1, 'state': 8093.1}}]
2023-10-09 04:14:57.018 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> checked out from pool
2023-10-09 04:14:57.029 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> being returned to pool
2023-10-09 04:14:57.030 DEBUG (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Connection <sqlite3.Connection object at 0x7f8256f56e30> rollback-on-return

@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

Thanks. Pretty sure we should be good to go with this one once 2023.10.2 is out

@justinmaiuto
Copy link
Author

Awesome! Thanks for all the focus on this one!

Any ideas as to why this issue only shows up in the 2023.10.x release?

@bdraco
Copy link
Member

bdraco commented Oct 8, 2023

Awesome! Thanks for all the focus on this one!

Any ideas as to why this issue only shows up in the 2023.10.x release?

The query is a bit different in 2023.10.x so it just happens to be more likely to hit the bug

@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants