Logbook missing generic_thermostat entry

Hi!

Today I was trying to investigate why my generic_thermostat (controlling a gas fireplace) turned on, and discovered that the “on” state event (heat) was not in the logbook! However the fireplace entity “on” itself was, but with no context (I assume the generic_thermostat turned it on, but still unsure). Most concerning is the missing logbook entry.

Relevant logbook entries are:

  • 20:42:43 - 1 hour ago - Thermostat turned off triggered by service climate.set_hvac_mode
  • 20:29:12 - 1 hour ago - Fireplace turned off triggered by service homeassistant.turn_off
  • 19:34:05 - 2 hours ago - Fireplace turned on
  • 00:26:08 - 21 hours ago - Fireplace turned off triggered by automation Switch Trigger: Lower stairs sconce 2 press down lower all off triggered by event ‘zwave_js_value_notification’
  • 00:26:08 - 21 hours ago - Thermostat turned off triggered by automation Switch Trigger: Lower stairs sconce 2 press down lower all off triggered by event 'zwave_js_value_notification’

But looking in home-assistant_v2.db, I do indeed see the thermostat on/heat event (time zone offset added to match logbook):

|4182021||light.rec_room_fireplace|on||||2023-01-25 19:34:05||4181578|626073|0|01GQP27H06496JV191QK2H2B2T|
|4182002||climate.rec_room_fireplace_thermostat|heat|||2023-01-25 19:32:01|2023-01-25 19:33:12||4181805|649178|0|01GQP25XJSJM9MDKRRYJM40HCW|
|4181578||light.rec_room_fireplace|off||||2023-01-25 19:32:08|||626079|0|01GQP23Y9ZVCR6J1TGVZXSKZEK|
|4181805||climate.rec_room_fireplace_thermostat|heat|||2023-01-25 19:32:01|2023-01-25 19:32:08||4181042|616321|0|01GQP23Y80BEE7SV0QC59QW232|
===> |4181042||climate.rec_room_fireplace_thermostat|heat||||2023-01-25 19:32:01|||617219|0|01GQP23QEEM0J27JNQPA4B6V1Z|
|4180937||climate.rec_room_fireplace_thermostat|off|||2023-01-25 00:26:09|2023-01-25 19:28:12||4180882|614678|0|01GQP1WRKBDWP3HMBV3HVDR767|

Is this a bug that the heat/on generic_thermostat state change is in home-assistant_v2.db but not the logbook in the UI?

Thanks!

I’ve seeing this same issue with a bunch of zigbee devices (zha, devices are Aqara door sensors). They will sometimes show open even though closed(or vice versa). So the logbook will show closed closed with no open between them.

However automations are working properly for the given state trigger.

I’m seeing this on two separate instances of HA starting sometime after 2022.01 I believe.