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

Deconz sending to small offset (Bosch Thermostat II) #1130

Open wovka88 opened 11 months ago

wovka88 commented 11 months ago

Prerequisites

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.11.1",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Berlin",
    "os_name": "Linux",
    "os_version": "6.1.21-v8",
    "supervisor": "2023.11.0",
    "host_os": "Home Assistant OS 11.1",
    "docker_version": "24.0.6",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "auto_backup": {
      "version": "1.4.1",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "better_thermostat": {
      "version": "1.4.0",
      "requirements": []
    },
    "nodered": {
      "version": "3.1.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.4.0",
    "is_built_in": false
  },
  "data": {
    "info": {
      "name": "Schlafzimmer Walter",
      "temperature_sensor": "sensor.garage_multisensor",
      "off_temperature": 20,
      "tolerance": 1.0,
      "humidity_sensor": "sensor.garage_multisensor_2",
      "outdoor_sensor": "sensor.aussen_multisensor",
      "window_sensors": "binary_sensor.ogszw_window",
      "weather": "weather.adelsheim",
      "window_off_delay": 30,
      "window_off_delay_after": 30,
      "cooler": null,
      "model": "RBSH-TRV0-ZB-EU"
    },
    "thermostat": {
      "climate.thermostat_66": {
        "name": "RBSH-TRV0-ZB-EU",
        "state": "heat",
        "attributes": {
          "hvac_modes": [
            "heat",
            "off",
            "auto"
          ],
          "min_temp": 7,
          "max_temp": 35,
          "current_temperature": 18.0,
          "temperature": 20.0,
          "hvac_action": "heating",
          "offset": 0,
          "valve": 69,
          "locked": false,
          "friendly_name": "RBSH-TRV0-ZB-EU",
          "supported_features": 1
        },
        "bt_config": {
          "calibration": "local_calibration_based",
          "calibration_mode": "default",
          "protect_overheating": false,
          "no_off_system_mode": false,
          "heat_auto_swapped": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "deconz",
        "bt_integration": "deconz",
        "model": "RBSH-TRV0-ZB-EU"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.garage_multisensor",
      "state": "17.79",
      "attributes": {
        "state_class": "measurement",
        "on": true,
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Garage - Multisensor"
      },
      "last_changed": "2023-11-10T08:13:20.216796+00:00",
      "last_updated": "2023-11-10T08:13:20.216796+00:00",
      "context": {
        "id": "01HEW4NVERAVDJX69JDD9H403C",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.ogszw_window",
      "state": "off",
      "attributes": {
        "on": true,
        "temperature": 22.0,
        "device_class": "window",
        "friendly_name": "OG SZ W: Fenster"
      },
      "last_changed": "2023-11-10T08:13:20.128690+00:00",
      "last_updated": "2023-11-10T08:13:20.128690+00:00",
      "context": {
        "id": "01HEW4NVC06F2KQMTGJKE6HXD1",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}

Description

I have the problem that BT sends to small offset to deconz. At the difference of 2.0°C, BT send also as offset 2.0. But for deconz and the thermostat is 2.0 = 0.002°C

For Offset -2.0°C I have tosend -200 insted of -2.0 For Offset -0.2°C I have tosend -20 insted of -0.2

Versions

1.4

Additional Information

folfy commented 10 months ago

I saw some option to implement a calibration in a device-specific quirk with BT - Making a comment for myself to check into this.

mldytech commented 10 months ago

I saw some option to implement a calibration in a device-specific quirk with BT - Making a comment for myself to check into this.

@folfy Is there anything new in this regard?

wovka88 commented 10 months ago

I did a quick fix for myself first, so far it's working.

But I don't think it's the final solution:

https://github.com/wovka88/better_thermostat/commit/08fd40c8155ec4a3ace221e0fb99c2f4c3daa6c4