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
893 stars 132 forks source link

Device Unavailable #1064

Closed I-Would-Like-To-Report-A-Bug-Please closed 1 month ago

I-Would-Like-To-Report-A-Bug-Please commented 1 year ago

Prerequisites

{
  "home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2023.8.2",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.11.4",
    "docker": true,
    "arch": "x86_64",
    "timezone": "Europe/London",
    "os_name": "Linux",
    "os_version": "5.15.0-83-generic",
    "run_as_root": true
  },
  "custom_components": {
    "better_thermostat": {
      "version": "1.3.0",
      "requirements": []
    },
    "average": {
      "version": "2.3.0",
      "requirements": []
    },
    "presence_simulation": {
      "version": "3.1",
      "requirements": []
    },
    "hacs": {
      "version": "1.32.1",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "fontawesome": {
      "version": "2.1.5",
      "requirements": []
    },
    "govee": {
      "version": "0.2.2",
      "requirements": [
        "govee-api-laggat==0.2.2",
        "dacite==1.6.0"
      ]
    }
  },
  "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.3.0",
    "is_built_in": false
  },
  "data": {
    "info": {
      "name": "BetterOffice",
      "temperature_sensor": "sensor.temperature_sensor_office_temperature",
      "off_temperature": 20,
      "tolerance": 0.0,
      "window_sensors": null,
      "humidity_sensor": null,
      "outdoor_sensor": null,
      "weather": null,
      "window_off_delay": 0,
      "model": "ME167"
    },
    "thermostat": {
      "climate.heating_trv_office": {
        "name": "Heating.TRV.Office",
        "state": "auto",
        "attributes": {
          "hvac_modes": [
            "auto",
            "heat",
            "off"
          ],
          "min_temp": 5.0,
          "max_temp": 35.0,
          "target_temp_step": 1.0,
          "current_temperature": 16.0,
          "temperature": 16.0,
          "hvac_action": "off",
          "friendly_name": "Heating.TRV.Office",
          "supported_features": 1
        },
        "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": true,
          "homaticip": false
        },
        "bt_adapter": "mqtt",
        "bt_integration": "mqtt",
        "model": "ME167"
      }
    },
    "external_temperature_sensor": {
      "entity_id": "sensor.temperature_sensor_office_temperature",
      "state": "19.31",
      "attributes": {
        "state_class": "measurement",
        "unit_of_measurement": "\u00b0C",
        "device_class": "temperature",
        "friendly_name": "Temperature.Sensor.Office Temperature"
      },
      "last_changed": "2023-09-23T12:43:34.447399+00:00",
      "last_updated": "2023-09-23T12:43:34.447399+00:00",
      "context": {
        "id": "01HB1125NFD1VH1RNK18J1VTR8",
        "parent_id": null,
        "user_id": null
      }
    },
    "window_sensor": "-"
  }
}

Description

When adding basic Better thermostat device becomes unavailable immediately after adding.

Steps to Reproduce

  1. Add device

Expected behavior: Device available.

Versions

1.3.0 BT 2023.8.2 HA

Additional Information

ME167 available via Z2m

image image

thePsychotrop commented 1 year ago

I got the same issue with a TuYa TV02-Zigbee. I have 5 BT Devices, 4 are working and one is staying unavalible. Even if i delete it and create a new one.

I-Would-Like-To-Report-A-Bug-Please commented 1 year ago

For me none of my TRVs are working, same model but I wasn't able to get any of them working. This one is just example :/ Sad panda here especially it's already getting colder where I live.

wtom commented 1 year ago

Please activate the logs, there should be written why it's unavailable.

I-Would-Like-To-Report-A-Bug-Please commented 1 year ago
2023-09-24 18:03:30.550 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat BetterOffice: Starting version 1.3.0. Waiting for entity to be ready...
2023-09-24 18:03:30.550 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat BetterOffice: waiting for sensor entity with id 'number.heating_trv_office_temperature' to become fully available...
2023-09-24 18:03:33.219 INFO (MainThread) [custom_components.better_thermostat.adapters.mqtt] better_thermostat BetterOffice: waiting for TRV/climate entity with id 'number.heating_trv_office_temperature' to become fully available...

Checked the state of this: image

Not sure where the number. is coming from but my trv looks like this: image


Small edit, Just clicked on the (I) information on the number. and moved the slider back and forth, and it from unkown became 0 and then thermostat became available. Oo.

Not sure what is that number. thing but I presume it shouldn't behave like this?

wtom commented 1 year ago

It's for the temperature calibration of the TRV. I will build a fallback for the unknown state.

thePsychotrop commented 1 year ago
2023-09-24 18:03:30.550 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat BetterOffice: Starting version 1.3.0. Waiting for entity to be ready...
2023-09-24 18:03:30.550 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat BetterOffice: waiting for sensor entity with id 'number.heating_trv_office_temperature' to become fully available...
2023-09-24 18:03:33.219 INFO (MainThread) [custom_components.better_thermostat.adapters.mqtt] better_thermostat BetterOffice: waiting for TRV/climate entity with id 'number.heating_trv_office_temperature' to become fully available...

Checked the state of this: image

Not sure where the number. is coming from but my trv looks like this: image

Small edit, Just clicked on the (I) information on the number. and moved the slider back and forth, and it from unkown became 0 and then thermostat became available. Oo.

Not sure what is that number. thing but I presume it shouldn't behave like this?

That worked for me too thx!

julianbl commented 1 year ago

This fixed for me too... but not exactly the same. Be sure that all values are defined and shown in zigbee2mqtt... once defined, BT works!

ep42on commented 12 months ago

moving the slider worked for me too

jakearchibald commented 9 months ago

I have a BRT-100-TRV and had the same issue. In zigbee2mqtt, one of the TRVs had a blank offset. Same as others are reporting, I dragged it back and forth so it was 0, and everything started working.