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
831 stars 126 forks source link

Sonoff TRVZB - Current Temp always at 0 #1370

Open Unclezz opened 3 months ago

Unclezz commented 3 months ago

Prerequisites

hvac_modes: off, auto, heat
min_temp: 4
max_temp: 35
target_temp_step: 0.5
**current_temperature: 28.1**
temperature: 7
hvac_action: idle
friendly_name: TRV_BagnoS
supported_features: 385
hvac_modes: heat, off
min_temp: 4
max_temp: 35
target_temp_step: 0.5
preset_modes: none
**current_temperature: 0**
temperature: 7
hvac_action: off
preset_mode: none
window_open: false
call_for_heat: false
last_change: 2024-07-21T12:19:27.897006
saved_temperature: null
humidity: 0
main_mode: off
tolerance: 0
heating_power: 0.01
errors: []
batteries: {"number.trv_bagnob_local_temperature": {"battery": "100", "battery_id": "sensor.trv_bagnob_battery"}, "climate.trv_bagnos": {"battery": "100", "battery_id": "sensor.trv_bagnos_battery"}}
friendly_name: BagnoS_Heating2
supported_features: 401
{
"home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2024.7.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.12.4",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/Prague",
    "os_name": "Linux",
    "os_version": "6.6.33-haos",
    "supervisor": "2024.06.2",
    "host_os": "Home Assistant OS 12.4",
    "docker_version": "26.1.4",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "documentation": "https://hacs.xyz/docs/configuration/start",
      "version": "1.34.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "climate_group": {
      "documentation": "https://github.com/bjrnptrsn/climate_group",
      "version": "1.0.5",
      "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": 3.716400000541853e-05
    },
    "01J2YBS89FPYEQR6T18HHJ99EB": {
      "wait_import_platforms": -0.35828946399999495,
      "config_entry_setup": 0.3878402579999971
    },
    "01J2YBWHST3QN4VM5XPDR6BPBE": {
      "wait_import_platforms": -0.3877905129999988,
      "config_entry_setup": 0.3902014740000084
    },
    "01J2YCF571SNC6E6AA9BREH2MR": {
      "wait_import_platforms": -0.3901883919999989,
      "config_entry_setup": 0.39261655699999665
    },
    "01J2YCMEE7QGXDG8XH2NX13XJN": {
      "wait_import_platforms": -0.3926074169999936,
      "config_entry_setup": 0.3952250310000096
    },
    "01J3276MCM7AF8A8S99C4HXH7N": {
      "wait_import_platforms": -0.39521929400000033,
      "config_entry_setup": 0.39735731599999724
    },
    "01J3278WB66VFNB1TW1TMW0TYK": {
      "wait_import_platforms": -0.3973514359999939,
      "config_entry_setup": 0.39951334699999563
    }
  },
  "data": {
    "info": {
      "name": "BagnoS_Heating2",
      "temperature_sensor": "number.trv_bagnob_local_temperature",
      "off_temperature": 15,
      "tolerance": 0.0,
      "target_temp_step": 0.0,
      "weather": "weather.forecast_home",
      "window_sensors": null,
      "humidity_sensor": null,
      "outdoor_sensor": null,
      "cooler": null,
      "window_off_delay": 0,
      "window_off_delay_after": 0,
      "model": "TRVZB"
    },
    "thermostat": {
      "climate.trv_bagnos": {
        "name": "TRV_BagnoS",
        "state": "off",
        "attributes": {
          "hvac_modes": [
            "off",
            "auto",
            "heat"
          ],
          "min_temp": 4.0,
          "max_temp": 35.0,
          "target_temp_step": 0.5,
          **"current_temperature": 28.1,**
          "temperature": 7.0,
          "hvac_action": "idle",
          "friendly_name": "TRV_BagnoS",
          "supported_features": 385
        },
        "bt_config": {
          "calibration": "target_temp_based",
          "calibration_mode": "heating_power_calibration",
          "protect_overheating": true,
          "no_off_system_mode": false,
          "heat_auto_swapped": false,
          "child_lock": false,
          "homaticip": false
        },
        "bt_adapter": "mqtt",
        "bt_integration": "mqtt",
        "model": "TRVZB"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "number.trv_bagnob_local_temperature",
      "state": "0",
      "attributes": {
        "min": -7.0,
        "max": 7.0,
        "step": 0.2,
        "mode": "auto",
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "icon": "mdi:math-compass",
        "friendly_name": "TRV_BagnoB Temperature"
      },
      "last_changed": "2024-07-21T09:40:46.383120+00:00",
      "last_reported": "2024-07-21T09:40:46.383120+00:00",
      "last_updated": "2024-07-21T09:40:46.383120+00:00",
      "context": {
        "id": "01J3AAMGNF53WR258G90QSJXJS",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": "-"
  }
}

Description

BT does not show the current temperature from the sensor/TRV

Steps to Reproduce

  1. TRV is configured and imported in HA through MQTT
  2. Create a new device in BT, selecting as Temperature Sensor the TRV previously configure in MQTT
  3. Adding a card in the UI from BT or Better-UI-thermostat does not show the current temperature. Also in BT/Controls temperature shows at 0.

Expected behavior:

Correct showing of the temperature read from the TRV. I highlighted that the diagnostics from BT show the current temperature!

Versions

HA: 2024.7.3 and 2024.7.2 BT: 1.6.1

Additional Information

Attached screenshot TRV_no_temp

Unclezz commented 3 months ago

To temporarely fix the issue I created a new Sensor Template using the following:

{{ state_attr('climate.', 'current_temperature') }}

I then used the newly created sensor in BT as a source for the current temperature.