KartoffelToby/better-thermostat-ui-card

Errors in Home Assistant log during startup

mkanet opened this issue · 0 comments

mkanet commented

After installing the better-thermostat-ui-card and configured it like this:

  - type: custom:better-thermostat-ui-card
    entity: climate.t6_pro_z_wave_programmable_thermostat_with_smartstart
    disable_window: false
    disable_eco: false
    set_current_as_main: true
    disable_menu: true
    disable_summer: false
    disable_buttons: true

The card seems to work as expected. However, when Home Assistant boots up, I always see the below set of errors every single time. This doesn't happen with the official Themostat card for Home Assistant on the same setup.

2024-01-02 17:21:29.208 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/config/custom_components/better_thermostat/climate.py", line 772, in startup
    await init(self, trv)
  File "/config/custom_components/better_thermostat/utils/bridge.py", line 46, in init
    return await self.real_trvs[entity_id]["adapter"].init(self, entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/adapters/generic.py", line 39, in init
    ).state in (STATE_UNAVAILABLE, STATE_UNKNOWN, None):
      ^^^^^
AttributeError: 'NoneType' object has no attribute 'state'

Is it possible to at least suppress these errors when Home Assistant is still starting up? This is the only component on my Home Assistant setup that produces errors at startup.

PS: I am NOT using the respective Better Thermostat Integration. I can't even get past the setup screen; even though all items are populated with basic sensors. However, that's going to be a separate Issue for the Better Thermostat integration.

Thank you so much for all your hard work maintaining Better Thermostat!