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
746 stars 122 forks source link

Heating does not work, unable to set heat, BetterThermostat entity not available #1170

Open 0verEngineer opened 9 months ago

0verEngineer commented 9 months ago

Prerequisites


* [ x] Output from Home Assistant Device Diagnostic from BT

```json
{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2023.11.2",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.4.14-200.fc38.x86_64",
    "run_as_root": true
  },
  "custom_components": {
    "better_thermostat": {
      "version": "1.4.0",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "simpleicons": {
      "version": "v2.2.0",
      "requirements": [
        "simpleicons==7.14.0"
      ]
    },
    "dual_smart_thermostat": {
      "version": "0.5.5",
      "requirements": []
    },
    "truenas": {
      "version": "0.0.0",
      "requirements": []
    },
    "momentary": {
      "version": "0.6.3",
      "requirements": []
    },
    "xiaomi_cloud_map_extractor": {
      "version": "v2.2.0",
      "requirements": [
        "pillow",
        "pybase64",
        "python-miio",
        "requests",
        "pycryptodome"
      ]
    },
    "eventsensor": {
      "version": "3.3.1",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "better_thermostat",
    "name": "Better Thermostat",
    "after_dependencies": [
      "climate"
    ],
    "codeowners": [
      "@kartoffeltoby"
    ],
    "config_flow": true,
    "dependencies": [
      "climate",
      "recorder"
    ],
    "documentation": "https://github.com/KartoffelToby/better_thermostat",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/KartoffelToby/better_thermostat/issues",
    "requirements": [],
    "version": "1.4.0",
    "is_built_in": false
  },
  "data": {
    "info": {
      "name": "Better_Thermostat_Livingroom",
      "temperature_sensor": "sensor.temp_wohnzimmer_temperature",
      "off_temperature": 19,
      "tolerance": 1.0,
      "humidity_sensor": "sensor.temp_wohnzimmer_humidity",
      "outdoor_sensor": "sensor.temp_balkon_temperature",
      "weather": "weather.forecast_home",
      "window_sensors": "binary_sensor.window_sensors_wohnzimmer_group",
      "cooler": null,
      "window_off_delay": 60,
      "window_off_delay_after": 60,
      "model": "ME168"
    },
    "thermostat": {
      "climate.thermostat_02_livingroom": {
        "name": "Thermostat_02_Livingroom",
        "state": "heat",
        "attributes": {
          "hvac_modes": [
            "auto",
            "heat",
            "off"
          ],
          "min_temp": 5.0,
          "max_temp": 35.0,
          "target_temp_step": 1.0,
          "current_temperature": 16.0,
          "temperature": 5.0,
          "hvac_action": "off",
          "friendly_name": "Thermostat_02_Livingroom",
          "supported_features": 1
        },
        "bt_config": {
          "calibration": "target_temp_based",
          "calibration_mode": "heating_power_calibration",
          "protect_overheating": false,
          "no_off_system_mode": false,
          "heat_auto_swapped": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "mqtt",
        "bt_integration": "mqtt",
        "model": "ME168"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.temp_wohnzimmer_temperature",
      "state": "19.12",
      "attributes": {
        "state_class": "measurement",
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Temp_Wohnzimmer Temperature"
      },
      "last_changed": "2023-12-02T12:20:32.968530+00:00",
      "last_updated": "2023-12-02T12:20:32.968530+00:00",
      "context": {
        "id": "01HGN7JAJ8K5QVJSB38N3ZVWZG",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.window_sensors_wohnzimmer_group",
      "state": "off",
      "attributes": {
        "entity_id": [
          "binary_sensor.window_sensor_01_balkon_contact",
          "binary_sensor.window_sensor_02_wohnzimmer_contact"
        ],
        "friendly_name": "window_sensors_wohnzimmer_group"
      },
      "last_changed": "2023-12-02T07:00:35.774047+00:00",
      "last_updated": "2023-12-02T07:00:35.774047+00:00",
      "context": {
        "id": "01HGMN8F94MR8HJTFJRN0Y0FE7",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}

Description

Does not work, unable to head, resets back to very low temp, log says entity not available.

Steps to Reproduce

  1. Set temperature with ui to 22
  2. refresh
  3. see temp reset to 7, 8 or 14 degrees

Expected behavior:

Temperature correctly set to 22

Actual behavior:

Refresh -> Temp reset back to 7, 8 or 14 degree celsius, log says the better thermostat entity not available

Versions

BT stands for Bluetooth, but i assume you mean Better Thermostat, i would not use BT this way, very confusing.

HA: 2023.11.2 BT: 1.4.0

Additional Information

image

It worked till yesterday where i added door/window sensors to the two thermostats that are now bugged, the other two are working.

0verEngineer commented 9 months ago

A restart of Homeassistant fixed it for now, however it should definitely never happen that the heating temp is somehow modified through a bug, it should always use the temp i have set and the UI cards should show a Warning / or turn greyed out when the entity is not available.

PetziAt commented 8 months ago

I had also an issue with "not available". Problem on my site was the weather entity. If it isn't work correctly the integration fails. Not all weather integrations are working with BT. Openweathermap is fine.