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

BT reports unsupported HVACs Mode #1144

Open deveth0 opened 9 months ago

deveth0 commented 9 months ago

Prerequisites

{
  "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.2.16-19-pve",
    "run_as_root": true
  },
  "custom_components": {
    "better_thermostat": {
      "version": "1.4.0",
      "requirements": []
    },
    "climate_group": {
      "version": "0.4.2",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "xiaomi_cloud_map_extractor": {
      "version": "v2.2.0",
      "requirements": [
        "pillow",
        "pybase64",
        "python-miio",
        "requests",
        "pycryptodome"
      ]
    }
  },
  "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": "Heizung Wohnzimmer rechts",
      "temperature_sensor": "sensor.temperatur_wohnzimmer_s1_temperature",
      "off_temperature": 20,
      "tolerance": 1.0,
      "humidity_sensor": "sensor.temperatur_wohnzimmer_s1_humidity",
      "outdoor_sensor": "sensor.temperatur_balkon_s10_temperature",
      "window_sensors": "binary_sensor.wohnzimmer_fenstersensoren",
      "weather": "weather.forecast_leipzig",
      "window_off_delay_after": 600,
      "cooler": null,
      "window_off_delay": 0,
      "model": "TS0601_thermostat"
    },
    "thermostat": {
      "climate.heizung_wohnzimmer_rechts_h1": {
        "name": "Heizung Wohnzimmer rechts - H1",
        "state": "off",
        "attributes": {
          "hvac_modes": [
            "heat",
            "auto",
            "off"
          ],
          "min_temp": 5.0,
          "max_temp": 35.0,
          "target_temp_step": 0.5,
          "preset_modes": [
            "none",
            "schedule",
            "manual",
            "boost",
            "complex",
            "comfort",
            "eco",
            "away"
          ],
          "current_temperature": 19.0,
          "temperature": 20.0,
          "hvac_action": "off",
          "preset_mode": "manual",
          "auto_lock": "MANUAL",
          "away_mode": "OFF",
          "away_preset_days": 1,
          "away_preset_temperature": 15,
          "battery_low": false,
          "boost_time": 300,
          "child_lock": "UNLOCK",
          "comfort_temperature": 20,
          "current_heating_setpoint": 20,
          "eco_temperature": 15,
          "force": "close",
          "holidays": [
            {
              "hour": 6,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 8,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 18,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 20,
              "minute": 30,
              "temperature": 12
            },
            {
              "hour": 22,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 23,
              "minute": 30,
              "temperature": 12
            }
          ],
          "holidays_schedule": "06:00/12\u00b0C 08:00/12\u00b0C 18:00/12\u00b0C 20:30/12\u00b0C 22:00/12\u00b0C 23:30/12\u00b0C",
          "linkquality": 51,
          "local_temperature": 19,
          "local_temperature_calibration": 0,
          "max_temperature": 35,
          "min_temperature": 5,
          "position": 0,
          "preset": "manual",
          "programming_mode": null,
          "running_state": "idle",
          "system_mode": "off",
          "update": {
            "installed_version": 87,
            "latest_version": 87,
            "state": "idle"
          },
          "update_available": false,
          "valve_detection": null,
          "week": "5+2",
          "window_detection": "OFF",
          "window_detection_params": {
            "minutes": 10,
            "temperature": 5
          },
          "window_open": false,
          "workdays": [
            {
              "hour": 6,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 8,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 18,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 20,
              "minute": 30,
              "temperature": 12
            },
            {
              "hour": 22,
              "minute": 0,
              "temperature": 12
            },
            {
              "hour": 23,
              "minute": 30,
              "temperature": 12
            }
          ],
          "workdays_schedule": "06:00/12\u00b0C 08:00/12\u00b0C 18:00/12\u00b0C 20:30/12\u00b0C 22:00/12\u00b0C 23:30/12\u00b0C",
          "friendly_name": "Heizung Wohnzimmer rechts - H1",
          "supported_features": 17
        },
        "bt_config": {
          "calibration": "local_calibration_based",
          "calibration_mode": "default",
          "protect_overheating": false,
          "no_off_system_mode": false,
          "heat_auto_swapped": true,
          "valve_maintenance": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "mqtt",
        "bt_integration": "mqtt",
        "model": "TS0601_thermostat"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.temperatur_wohnzimmer_s1_temperature",
      "state": "19.2",
      "attributes": {
        "state_class": "measurement",
        "battery": 77,
        "humidity": 66.6,
        "linkquality": 108,
        "power_outage_count": 35448,
        "pressure": 988.2,
        "temperature": 19.2,
        "voltage": 2965,
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Temperatur Wohnzimmer - S1 Temperatur"
      },
      "last_changed": "2023-11-14T18:41:23.522615+00:00",
      "last_updated": "2023-11-14T18:41:23.522615+00:00",
      "context": {
        "id": "01HF7J6QJ2PH7BCG28KGTB1C9E",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.wohnzimmer_fenstersensoren",
      "state": "off",
      "attributes": {
        "entity_id": [
          "binary_sensor.fenster_wohnzimmer_rechts_f1_contact",
          "binary_sensor.fenster_wohnzimmer_links_f2_contact"
        ],
        "device_class": "window",
        "icon": "mdi:window-open",
        "friendly_name": "Wohnzimmer Fenstersensoren"
      },
      "last_changed": "2023-11-12T12:47:16.578932+00:00",
      "last_updated": "2023-11-12T12:47:16.578932+00:00",
      "context": {
        "id": "01HF1S4WJN9S9HXHNT76RK9VWE",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}

Description

Although the configuration to swap "auto" and "heat" is enabled, BT reports that my device does not support the HVAC mode.

Steps to Reproduce

  1. Add device
  2. Enable heating

Expected behavior:

Mode should be set to "auto", no errors should be logged.

Actual behavior:

2023-11-14 20:05:35.027 ERROR (MainThread) [custom_components.better_thermostat.utils.helpers] better_thermostat Heizung Wohnzimmer: climate.heizung_wohnzimmer_rechts_h1 HVAC mode auto is not supported by this device, is it possible that you forgot to set the heat auto swapped option?

Versions

2023.11.2 // 1.3.0

Additional Information

xammmue commented 9 months ago

I think I have a similar issue. After some amount of time my TRV changes in the auto mode, which then leads BT to change to off which then seems to trigger the TRV to also switch in the OFF mode and no more heating is applied.

I got a "Eurotronic spirit" though, so not the same model as yours