Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target Temperature Resets to always the same Value (e.g. 5°C) after reaching room temperature #1407

Open
3 tasks done
Blural opened this issue Oct 3, 2024 · 0 comments
Open
3 tasks done
Assignees
Labels
new bug incoming bug issue

Comments

@Blural
Copy link

Blural commented Oct 3, 2024

Prerequisites

  • Device
    Bosch Thermostat II RBSH-TRV0-ZB-EU

  • Device HA from Developer Tools on pure climate

hvac_modes: off, heat, auto 
min_temp: 5 
max_temp: 30 
target_temp_step: 0.5 
current_temperature: 15 
temperature: 5 
hvac_action: idle 
friendly_name: Heizungsthermostat-WohnzimmerSued 
supported_features: 385
  • Output from Home Assistant Device Diagnostic from BT
{
  "home_assistant": {
    "installation_type": "Home Assistant Supervised",
    "version": "2024.9.2",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.4",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.1.0-23-amd64",
    "supervisor": "2024.09.1",
    "host_os": "Debian GNU/Linux 12 (bookworm)",
    "docker_version": "27.1.1",
    "chassis": "desktop",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "2.0.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "thermal_comfort": {
      "documentation": "https://github.com/dolezsa/thermal_comfort/blob/master/README.md",
      "version": "2.2.2",
      "requirements": []
    },
    "better_thermostat": {
      "documentation": "https://github.com/KartoffelToby/better_thermostat",
      "version": "1.6.0",
      "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.6.0",
    "is_built_in": false
  },
  "setup_times": {
    "null": {
      "setup": 2.6867026463150978e-05
    },
    "01J6S14VKDPS1G1T740F1Q3VMA": {
      "wait_import_platforms": -1.5525322479661554,
      "config_entry_setup": 1.5705143780214712
    },
    "01J6S1XQ1P26FRXGWQ6P0WMGXY": {
      "wait_import_platforms": -1.6921363619621843,
      "config_entry_setup": 1.6947222020244226
    },
    "01J6S37C4YF52V65Y63CP1TV43": {
      "wait_import_platforms": -1.6947033799951896,
      "config_entry_setup": 1.69701361306943
    },
    "01J6S4H9QVN09V0H12M6NYG6A8": {
      "wait_import_platforms": -1.69700553198345,
      "config_entry_setup": 1.698775921948254
    },
    "01J6S4YM6CN28PTW47JGT7EQRB": {
      "wait_import_platforms": -1.698769876966253,
      "config_entry_setup": 1.7005658450070769
    },
    "01J6S5G2CZ79MN5YWR2YZ23X3Q": {
      "wait_import_platforms": -1.7005577450618148,
      "config_entry_setup": 1.7023545999545604
    }
  },
  "data": {
    "info": {
      "name": "Better Thermostat Esszimmer",
      "temperature_sensor": "sensor.sonoff_temphum_wz_temperature",
      "off_temperature": 19,
      "tolerance": 0.0,
      "target_temp_step": "0.0",
      "humidity_sensor": "sensor.sonoff_temphum_wz_humidity",
      "window_sensors": "binary_sensor.wohnzimmerfenstergruppe_sued",
      "window_off_delay_after": 600,
      "outdoor_sensor": null,
      "weather": null,
      "cooler": null,
      "window_off_delay": 0,
      "model": "BTH-RA"
    },
    "thermostat": {
      "climate.heizungsthermostat_wohnzimmersued": {
        "name": "Heizungsthermostat-WohnzimmerSued",
        "state": "off",
        "attributes": {
          "hvac_modes": [
            "off",
            "heat",
            "auto"
          ],
          "min_temp": 5.0,
          "max_temp": 30.0,
          "target_temp_step": 0.5,
          "current_temperature": 15.0,
          "temperature": 5.0,
          "hvac_action": "idle",
          "friendly_name": "Heizungsthermostat-WohnzimmerSued",
          "supported_features": 385
        },
        "bt_config": {
          "calibration": "local_calibration_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": "BTH-RA"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.sonoff_temphum_wz_temperature",
      "state": "19.7",
      "attributes": {
        "state_class": "measurement",
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Sonoff TempHum-WZ Temperatur"
      },
      "last_changed": "2024-10-03T17:43:26.006138+00:00",
      "last_reported": "2024-10-03T17:43:26.006138+00:00",
      "last_updated": "2024-10-03T17:43:26.006138+00:00",
      "context": {
        "id": "01J99QNFHPC36XA270NDTX9BRP",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.wohnzimmerfenstergruppe_sued",
      "state": "off",
      "attributes": {
        "device_class": "door",
        "icon": "mdi:window-closed",
        "friendly_name": "Wohnzimmerfenstergruppe S\u00fcd"
      },
      "last_changed": "2024-10-03T16:16:46.714906+00:00",
      "last_reported": "2024-10-03T16:16:46.714906+00:00",
      "last_updated": "2024-10-03T16:16:46.714906+00:00",
      "context": {
        "id": "01J99JPT3THXHMNBQ7RCS0Z3T8",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}

Description

I currently have 6 BT-instances with single TRVs installed. All with the same devices:

  • Bosch Thermostat II as TRV
  • Sonoff SNZB-02D as external Temp.-Sensors
  • [SNZB-04] as Window Detection Sensor

4 of 6 BT-Instances work perfect but two of them get the target temperature set to another value (always the same values for each entity). The strange set to another target temperature value only takes place if the target room temperature has been reached and the heating is stopped by BT. So without correcting the target values in the UI, the origin target temperature will not be reached / heated to again.

Playing with child look, removing external outdoor temp sensor, removing and reinstalling entitiy and devices, playing with any settings didn't fix anything.

One entitiy is setting always back to 15,5°C, the other one to 5°C.

Steps to Reproduce

  1. Set desired target temperature (e.g. 20°C) and activate heating
  2. Wait until room temperature has reached 20°C -> Heat off / heating PI demand 0%
  3. Target temperature changes itself to static (always the same) value (e.g. 5°C)

Expected behavior:

Turn heat off and maintain target temperature for each entitiy.

Actual behavior:

Target temperature is set to some static value after reaching setpoint (-> heat turning off).

Versions

HA 2024.9.2
BT 1.6.0
Zigbee2Mqtt 1.40.2

Additional Information

Debuggin the BT Integration shows some strange function called "trigger_trv_change test" which seems to be responsible for the change of target temperature.

Im not really into the code of BT, but a function called "test" at the end doesnt seem promising. What does this function do in detail?
Have look at the line

2024-10-03 16:32:20.425 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: **trigger_trv_change test / _old_heating_setpoint: 21.0 - _new_heating_setpoint: 5.0 - _last_temperature: 21.0**

..

2024-10-03 16:32:11.393 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_local_temperature_calibration: climate.heizungsthermostat_wohnzimmersued from: -1.0 to: -5.0
2024-10-03 16:32:12.514 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Better Thermostat Wohnzimmer: HA set target temperature to 21.0 & None
2024-10-03 16:32:12.516 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] better_thermostat None: climate.heizungsthermostat_wohnzimmernord / heating_power_valve_position - temp diff: 0.3 - heating power: 0.0108 - expected valve position: 28%
2024-10-03 16:32:12.516 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.heizungsthermostat_wohnzimmernord - new local calibration: -0.9 | external_temp: 20.7, trv_temp: 26.0, calibration: 5.0
2024-10-03 16:32:12.517 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_local_temperature_calibration: climate.heizungsthermostat_wohnzimmernord from: 5.0 to: -0.9
2024-10-03 16:32:14.400 DEBUG (MainThread) [custom_components.better_thermostat.adapters.generic] better_thermostat None: set_hvac_mode heat
2024-10-03 16:32:14.406 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_temperature: climate.heizungsthermostat_wohnzimmersued from: 20.0 to: 21.0
2024-10-03 16:32:14.409 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: climate.heizungsthermostat_wohnzimmersued / check_target_temp / _last: 21.0 - _current: 20.0
2024-10-03 16:32:14.985 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Better Thermostat Wohnzimmer: HA set target temperature to 20.5 & None
2024-10-03 16:32:15.524 DEBUG (MainThread) [custom_components.better_thermostat.adapters.generic] better_thermostat None: set_hvac_mode heat
2024-10-03 16:32:15.527 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_temperature: climate.heizungsthermostat_wohnzimmernord from: 20.0 to: 21.0
2024-10-03 16:32:15.529 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: climate.heizungsthermostat_wohnzimmernord / check_target_temp / _last: 21.0 - _current: 20.0
2024-10-03 16:32:16.037 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Better Thermostat Wohnzimmer: HA set target temperature to 20.0 & None
2024-10-03 16:32:16.984 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Better Thermostat Esszimmer: HA set target temperature to 20.0 & None
2024-10-03 16:32:17.411 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.heizungsthermostat_wohnzimmersued - new local calibration: -5.0 | external_temp: 20.7, trv_temp: 20.7, calibration: -5.0
2024-10-03 16:32:18.531 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.heizungsthermostat_wohnzimmernord - new local calibration: 1.7 | external_temp: 20.7, trv_temp: 26.0, calibration: -0.9
2024-10-03 16:32:20.425 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: **trigger_trv_change test / _old_heating_setpoint: 21.0 - _new_heating_setpoint: 5.0 - _last_temperature: 21.0**
2024-10-03 16:32:21.426 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Better Thermostat Bad: HA set target temperature to 19.5 & None
2024-10-03 16:32:21.428 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.heizungsthermostat_bad - new local calibration: 0.9 | external_temp: 19.4, trv_temp: 19.5, calibration: 0.1
2024-10-03 16:32:21.533 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.heizungsthermostat_wohnzimmernord - new local calibration: 1.7 | external_temp: 20.7, trv_temp: 26.0, calibration: -0.9
2024-10-03 16:32:26.417 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: trigger_trv_change test / _old_heating_setpoint: 5.0 - _new_heating_setpoint: 21.0 - _last_temperature: 21.0
2024-10-03 16:32:31.018 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: TRV climate.heizungsthermostat_wohnzimmersued sends new internal temperature from 20.7 to 16.5
@Blural Blural added the new bug incoming bug issue label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new bug incoming bug issue
Projects
None yet
Development

No branches or pull requests

2 participants