KartoffelToby / better_thermostat

This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity.
https://better-thermostat.org
GNU Affero General Public License v3.0
750 stars 122 forks source link

beta40 fails to start #615

Closed misch2 closed 1 year ago

misch2 commented 1 year ago

Prerequisites

{
  YOUR DEVICE DIAGNOSTICS JSON OUTPUT HERE
}

Description

BT fails to initialize:

2022-11-14 10:02:33.545 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] better_thermostat : found device:
2022-11-14 10:02:33.545 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] DeviceEntry(area_id='obyvak', config_entries={'8f236919b9507edc39c11efbdb773518'}, configuration_url='http://rpi2.local:8004//#/device/0x54ef4410005ad43f/info', connections=set(), disabled_by=None, entry_type=None, hw_version=None, id='0ba406f4d6268c6a87e4d9239e503035', identifiers={('mqtt', 'zigbee2mqtt_0x54ef4410005ad43f')}, manufacturer='Xiaomi', model='Aqara Smart Radiator Thermostat E1 (SRTS-A01)', name_by_user='Topení v obýváku (fyzické zařízení)', name='trv1_aqara_obyvak', suggested_area=None, sw_version='0.0.0_0025', via_device_id=None, is_new=False)
2022-11-14 10:02:33.548 DEBUG (MainThread) [custom_components.better_thermostat.utils.bridge] better_thermostat : uses adapter mqtt for trv climate.trv1_aqara_obyvak
2022-11-14 10:02:33.550 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] better thermostat: Could not find local calibration entity for climate.trv1_aqara_obyvak
2022-11-14 10:02:33.554 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] better thermostat: Could not find valve position entity for climate.trv1_aqara_obyvak
2022-11-14 10:02:39.253 DEBUG (MainThread) [custom_components.better_thermostat.config_flow] Confirm: [{'trv': 'climate.trv1_aqara_obyvak', 'integration': 'mqtt', 'model': 'SRTS-A01', 'adapter': None, 'advanced': {'calibration': 'target_temp_based', 'heat_auto_swapped': False, 'calibration_round': True, 'child_lock': False, 'homaticip': False}}]
2022-11-14 10:02:39.273 DEBUG (MainThread) [custom_components.better_thermostat.utils.bridge] better_thermostat Topení obývák: uses adapter mqtt for trv climate.trv1_aqara_obyvak
2022-11-14 10:02:39.273 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Topení obývák: Waiting for entity to be ready...
2022-11-14 10:02:39.274 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Topení obývák: Starting version 1.0.0-beta40. Waiting for entity to be ready...
2022-11-14 10:02:39.274 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] better thermostat Topení obývák: Could not convert 'None' to float in startup
2022-11-14 10:02:39.274 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Topení obývák: detected window state at startup: Closed
2022-11-14 10:02:39.274 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Topení obývák: Undefined target temperature, falling back to 22.5
2022-11-14 10:02:39.274 WARNING (MainThread) [custom_components.better_thermostat.climate] better_thermostat Topení obývák: No previously hvac mode found on startup, turn heat off
2022-11-14 10:02:39.279 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Topení obývák: Startup config, BT hvac mode is off, Target temp 22.5
2022-11-14 10:02:39.279 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 609, in startup
    self.real_trvs[trv]["last_calibration"] = await self.real_trvs[trv][
  File "/config/custom_components/better_thermostat/adapters/mqtt.py", line 67, in get_current_offset
    self.hass.states.get(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1333, in get
    return self._states.get(entity_id.lower())
AttributeError: 'NoneType' object has no attribute 'lower'

Steps to Reproduce

  1. Configure BT and wait for the entity to become accessible.

Expected behavior:

Entity climate.<name> is available.

Actual behavior:

Entity never starts to be available.

Versions

HA: 2022.10.5 BT: 1.0.0-beta40

Additional Information

pbranly commented 1 year ago

Same as https://github.com/KartoffelToby/better_thermostat/issues/613 Beta 40 is broken Phil

KartoffelToby commented 1 year ago

Fixed in Beta 41