better_thermostat icon indicating copy to clipboard operation
better_thermostat copied to clipboard

Setting the temperature directly on Tuya TV02 zigby2mqtt will not be recognized in the better thermostat backend of HA

Open joe67 opened this issue 1 year ago • 3 comments

Prerequisites

  • [ ] Tuya TV02 Zigbee
  • [ ] Output from Home Assistant Developer Tools state e.g.
  • [ ] Output from Home Assistant Device Diagnostic from BT

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.1.3",
    "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.63-haos-raspi",
    "supervisor": "2023.12.0",
    "host_os": "Home Assistant OS 11.4",
    "docker_version": "24.0.7",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "better_thermostat": {
      "version": "1.5.0-beta4",
      "requirements": []
    },
    "stateful_scenes": {
      "version": "1.1.1",
      "requirements": []
    },
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    }
  },
  "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.5.0-beta4",
    "is_built_in": false
  },
  "data": {
    "info": {
      "name": "BT TRV SZ",
      "temperature_sensor": "sensor.mi_luftreiniger_2h_temperature",
      "off_temperature": 19,
      "tolerance": 0.5,
      "target_temp_step": "0.0",
      "humidity_sensor": "sensor.mi_luftreiniger_2h_humidity",
      "window_sensors": "binary_sensor.fenstercontact_sz_contact",
      "outdoor_sensor": null,
      "weather": null,
      "cooler": null,
      "window_off_delay": 0,
      "window_off_delay_after": 0,
      "model": "TV02-Zigbee"
    },
    "thermostat": {
      "climate.trv_sz": {
        "name": "TRV_SZ",
        "state": "heat",
        "attributes": {
          "hvac_modes": [
            "off",
            "heat"
          ],
          "min_temp": 5.0,
          "max_temp": 30.0,
          "target_temp_step": 0.5,
          "preset_modes": [
            "none",
            "auto",
            "manual",
            "holiday"
          ],
          "current_temperature": 20.1,
          "temperature": 16.5,
          "preset_mode": "manual",
          "battery_low": false,
          "boost_timeset_countdown": 0,
          "child_lock": "UNLOCK",
          "comfort_temperature": 21,
          "current_heating_setpoint": 16.5,
          "eco_temperature": 17,
          "error_status": 0,
          "frost_protection": "OFF",
          "heating_stop": "OFF",
          "holiday_start_stop": "2021/01/01 01:01 | 2021/01/01 01:01",
          "holiday_temperature": 17,
          "linkquality": 232,
          "local_temperature": 20.1,
          "local_temperature_calibration": -2.1,
          "online": "ON",
          "open_window": "OFF",
          "open_window_temperature": 21,
          "preset": "manual",
          "schedule_friday": "06:00/17 12:00/21 14:00/17 17:00/21 24:00/17",
          "schedule_monday": "06:00/17 12:00/21 14:00/17 17:00/21 24:00/17",
          "schedule_saturday": "06:00/17 12:00/21 14:00/17 17:00/21 24:00/17",
          "schedule_sunday": "06:00/17 12:00/21 14:00/17 17:00/21 24:00/17",
          "schedule_thursday": "06:00/17 12:00/21 14:00/17 17:00/21 24:00/17",
          "schedule_tuesday": "06:00/17 12:00/21 14:00/17 17:00/21 24:00/17",
          "schedule_wednesday": "06:00/17 12:00/21 14:00/17 17:00/21 24:00/17",
          "system_mode": "heat",
          "update": {
            "installed_version": -1,
            "latest_version": -1,
            "state": null
          },
          "update_available": null,
          "working_day": "mon_fri+sat+sun",
          "friendly_name": "TRV_SZ",
          "supported_features": 17
        },
        "bt_config": {
          "calibration": "local_calibration_based",
          "calibration_mode": "heating_power_calibration",
          "protect_overheating": false,
          "no_off_system_mode": false,
          "heat_auto_swapped": true,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "mqtt",
        "bt_integration": "mqtt",
        "model": "TV02-Zigbee"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.mi_luftreiniger_2h_temperature",
      "state": "19.6",
      "attributes": {
        "state_class": "measurement",
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Temperature SZ"
      },
      "last_changed": "2024-01-15T16:33:49.488329+00:00",
      "last_updated": "2024-01-15T16:33:49.488329+00:00",
      "context": {
        "id": "01HM6ZHPXGMKG53BTDY0DAFME2",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": {
      "entity_id": "binary_sensor.fenstercontact_sz_contact",
      "state": "off",
      "attributes": {
        "battery": 90,
        "contact": true,
        "device_temperature": 17,
        "last_seen": "2023-09-07T19:42:59.848Z",
        "linkquality": 255,
        "power_outage_count": 14,
        "voltage": 2985,
        "device_class": "door",
        "friendly_name": "FensterContact SZ Door"
      },
      "last_changed": "2024-01-15T16:31:39.072464+00:00",
      "last_updated": "2024-01-15T16:44:24.813741+00:00",
      "context": {
        "id": "01HM7053BDB5C9YP12BPJH723B",
        "parent_id": null,
        "user_id": null
      }
    }
  }
}

Description

When i set the temperature directly on hte thermostat this will not be recognized from the back and Front end of the Better Thermostat Device. The setpoint state of the BT Device doesn't change. But on the base Device ( TRV over zigby2mqtt) i can see the setpoint changes i made directly on thermostat.

Steps to Reproduce

  1. Set the Setpoint directly on the thermostat

Expected behavior: Setpoint changes directly on the thermostat will be set in the BT Device

Setpoint changes directly on the thermostat will be set in the BT Device Actual behavior: I can't set the Temperature directly on the Thermostat for the BT Device

Versions

HA Core 2024.1.3 Supervisor 2023.12.0 Operating System 11.4 Frontend 20240104.0

BT Backend 1.5.0-beta4

BT UI 2.2.0

Additional Information

This error originated from a custom integration.

Logger: custom_components.better_thermostat.utils.const Source: custom_components/better_thermostat/utils/const.py:28 Integration: Better Thermostat (documentation, issues) First occurred: 5:32:15 PM (1 occurrences) Last logged: 5:32:15 PM

better_thermostat [Errno 2] No such file or directory: '/config/custom_components/better_thermostat/utils/manifest.json': could not read version from manifest file.

Logger: homeassistant.components.mqtt.climate Source: components/mqtt/climate.py:828 Integration: MQTT (documentation, issues) First occurred: 5:34:17 PM (325 occurrences) Last logged: 6:17:00 PM

Invalid modes mode: auto

joe67 avatar Jan 15 '24 17:01 joe67

I see the same behavior, but not always in some cases it works. Also, the correct temperature can be seen on the physical MQTT device in HA until it's overwritten by better thermostat.

twieland avatar Jan 21 '24 21:01 twieland

I am using a set of two Sonoff TRVs with the offset mode. I was able to change the setpoint on a local device temporarly but it did not change the setpoint in BT. I did not know if this was "work as expected" but would wish it would be possible to get a better user experience.

konus1 avatar Feb 14 '24 11:02 konus1

I have the same issue. When this happens I am reloading the BT configuration. Than it works again for a while.

Cnsn80 avatar Feb 28 '24 09:02 Cnsn80