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
713 stars 124 forks source link

BT: Integration does not re-enable thermostat after opened window is closed again #1195

Open Malachi801 opened 6 months ago

Malachi801 commented 6 months ago

Prerequisites

State: heat

Attributes: hvac_modes: heat, off min_temp: 7 max_temp: 35 target_temp_step: 0.1 current_temperature: 17.7 temperature: 26 hvac_action: heating window_open: false call_for_heat: true last_change: 2023-12-10T11:10:20.725744 saved_temperature: null humidity: 72 main_mode: heat tolerance: 0.3 heating_power: 0.01 errors: [] batteries: {"sensor.indoor_temperature_froggit": {"battery": "off", "battery_id": "binary_sensor.wh65_battery"}, "sensor.indoor_humidity_froggit": {"battery": "off", "battery_id": "binary_sensor.wh65_battery"}, "binary_sensor.sensor_terassentur": {"battery": "100", "battery_id": "sensor.sensor_terassentur_battery_level"}, "climate.thermostat_wohnzimmer": {"battery": "36", "battery_id": "sensor.thermostat_89_battery"}} friendly_name: Wohnzimmer supported_features: 1

{
{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.12.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.1.63-haos",
    "supervisor": "2023.11.6",
    "host_os": "Home Assistant OS 11.2",
    "docker_version": "24.0.7",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "auto_backup": {
      "version": "1.4.1",
      "requirements": []
    },
    "thermal_comfort": {
      "version": "2.2.0",
      "requirements": []
    },
    "plant": {
      "version": "2023.11.0",
      "requirements": [
        "async-timeout>=4.0.2"
      ]
    },
    "overwolfstatus": {
      "version": "1.0.1",
      "requirements": []
    },
    "ics": {
      "version": "20211212.01",
      "requirements": [
        "recurring-ical-events",
        "icalendar>=4.0.4",
        "tzlocal",
        "integrationhelper",
        "voluptuous",
        "python-dateutil>2.7.3"
      ]
    },
    "openplantbook": {
      "version": "1.2.0",
      "requirements": [
        "pyopenplantbook==0.0.4"
      ]
    },
    "powercalc": {
      "version": "v1.9.9",
      "requirements": [
        "numpy>=1.21.1"
      ]
    },
    "hochwasserportal": {
      "version": "0.0.20",
      "requirements": [
        "lxml>=4.6.2,<5",
        "beautifulsoup4>=4.9.3,<5"
      ]
    },
    "irrigation_unlimited": {
      "version": "2023.11.0",
      "requirements": [
        "crontab"
      ]
    },
    "mold_risk_index": {
      "version": "1.1.0",
      "requirements": []
    },
    "alexa_media": {
      "version": "4.8.0",
      "requirements": [
        "alexapy==1.27.10",
        "packaging>=20.3",
        "wrapt>=1.14.0"
      ]
    },
    "solar_optimizer": {
      "version": "3.0.0",
      "requirements": []
    },
    "xiaomi_miio_fan": {
      "version": "2023.7.0.0",
      "requirements": [
        "construct==2.10.56",
        "python-miio>=0.5.12"
      ]
    },
    "scene_presets": {
      "version": "0.1.0",
      "requirements": []
    },
    "scheduler": {
      "version": "v0.0.0",
      "requirements": []
    },
    "alarmo": {
      "version": "v1.9.13",
      "requirements": []
    },
    "better_thermostat": {
      "version": "1.4.0",
      "requirements": []
    },
    "adaptive_lighting": {
      "version": "1.20.0",
      "requirements": [
        "ulid-transform"
      ]
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "presence_simulation": {
      "version": "3.2",
      "requirements": []
    },
    "dwd": {
      "version": "2023.10.0",
      "requirements": []
    },
    "frigate": {
      "version": "4.0.0",
      "requirements": [
        "pytz==2022.7"
      ]
    }
  },
  "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": "Wohnzimmer",
      "temperature_sensor": "sensor.indoor_temperature_froggit",
      "off_temperature": 16,
      "humidity_sensor": "sensor.indoor_humidity_froggit",
      "outdoor_sensor": null,
      "window_sensors": "binary_sensor.sensor_terassentur",
      "window_off_delay": 45,
      "weather": "weather.openweathermap",
      "model": "eTRV0100",
      "tolerance": 0.3,
      "window_off_delay_after": 0
    },
    "thermostat": {
      "climate.thermostat_wohnzimmer": {
        "name": "Thermostat Wohnzimmer",
        "state": "heat",
        "attributes": {
          "hvac_modes": [
            "heat",
            "off"
          ],
          "min_temp": 7,
          "max_temp": 35,
          "current_temperature": 22.1,
          "temperature": 26.0,
          "hvac_action": "heating",
          "offset": 0,
          "valve": 92,
          "locked": false,
          "friendly_name": "Thermostat Wohnzimmer",
          "supported_features": 1
        },
        "bt_config": {
          "calibration": "local_calibration_based",
          "calibration_mode": "heating_power_calibration",
          "protect_overheating": false,
          "no_off_system_mode": true,
          "heat_auto_swapped": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "deconz",
        "bt_integration": "deconz",
        "model": "eTRV0100"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.indoor_temperature_froggit",
      "state": "17.8",
      "attributes": {
        "state_class": "measurement",
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Temperatur - innen"
      },
      "last_changed": "2023-12-10T15:44:54.545872+00:00",
      "last_updated": "2023-12-10T15:44:54.545872+00:00",
      "context": {
        "id": "01HHA6E8RH0DCVMGXTAW0K9KHD",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.sensor_terassentur",
      "state": "off",
      "attributes": {
        "on": true,
        "temperature": 18.0,
        "device_class": "door",
        "icon": "mdi:door",
        "friendly_name": "T\u00fcrsensor Wohnzimmer"
      },
      "last_changed": "2023-12-10T15:17:14.472140+00:00",
      "last_updated": "2023-12-10T15:17:14.472140+00:00",
      "context": {
        "id": "01HHA4VKK833F4AEPZJ2SEG08G",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}
}

Description

Thermostats to not re-enable after windows/doors are closed any stay switched off for all time. Re-enabling into heating mode has to be done by hand.

Steps to Reproduce

  1. Open window
  2. Thermostats are switched off after time as defined (correct behavior)
  3. Close window

Expected behavior:

Thermostats are switched on again after window is closed

Actual behavior:

Thermostats are NOT switched on again after window is closed. Manually switching on again into heating mode works.

Versions

Additional Information

Screenshots from setup:

Setup1

Setup2

Please feel free to request further information. I really love this project and hope my problem can be fixed.

FilipCZE commented 6 months ago

I have the same problem… Is there any solution yet? Thanks!

Splintix98 commented 6 months ago

Same problem here with Moes BRT-100-TRV. When they are configured to be set to 5°C instead of Off, they stay at 5°C after the window is closed and when they are configured to be turned off, they simply stay off.

maparth commented 5 months ago

Hello,

I'd like to report that I am experiencing a similar issue as mentioned in this thread. The problem occurs with the TRVs not automatically turning on after closing the corresponding windows. Currently, they automatically and correctly turn off after opening the window, but upon closing the window, I have to manually turn them on again.

TRV Model: GS361A-H04 Integration: Zigbee2Mqtt Better Thermostat version: 1.4.0 Tested with Home Assistant version: 2023.10.5 and 2024.1.0

wtom commented 5 months ago

All of you are having the problem with it and the option "TRV has no off mode" enabled? Because that could be the issue.

https://github.com/KartoffelToby/better_thermostat/blob/master/custom_components%2Fbetter_thermostat%2Futils%2Fcontrolling.py#L196-L201

Here is the part for opening the window. But the closing window part is missing to reset the temperature to what it was before.

maparth commented 5 months ago

I do have the option "TRV has no off mode" enabled.