dknowles2 / ha-pitboss

Home Assistant Custom Integration for PitBoss smokers and grills
MIT License
33 stars 4 forks source link

Grill in Celsius but min max_temp in Fahrenheit #52

Closed NanouMu closed 5 months ago

NanouMu commented 5 months ago

System Health details

System Information

version core-2024.6.1
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.29-haos
arch x86_64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 5000 Installed Version | 1.34.0 Stage | running Available Repositories | 1388 Downloaded Repositories | 23
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 12.3 -- | -- update_channel | stable supervisor_version | supervisor-2024.06.0 agent_version | 1.6.0 docker_version | 25.0.5 disk_total | 30.8 GB disk_used | 21.5 GB healthy | true supported | true host_connectivity | true supervisor_connectivity | true ntp_synchronized | true virtualization | kvm board | ova supervisor_api | ok version_api | ok installed_addons | Studio Code Server (5.15.0), MariaDB (2.7.1), ESPHome (2024.5.5), Advanced SSH & Web Terminal (18.0.0), Mosquitto broker (6.4.1), Zigbee2MQTT (1.38.0-1), Node-RED (17.0.13), Home Assistant Google Drive Backup (0.112.1), MQTT Explorer (browser-1.0.3)
Dashboards dashboards | 3 -- | -- resources | 16 views | 2 mode | storage
Recorder oldest_recorder_run | 4 juin 2024 à 12:56 -- | -- current_recorder_run | 10 juin 2024 à 17:13 estimated_db_size | 236.69 MiB database_engine | mysql database_version | 10.11.6

Checklist

Describe the issue

The Grill is set in Celsius The temps in climate and from the sensors (probes) are correctly shown in Celsius in HA But the min_temp and max_temp are in Fahrenheit When I want to set the temp of the grill from HA the range of temps is offset, HA think the min_temp and max_temp are Celsius so I get a minimum temperature of 180°c instead of 83°c for exemple.

Reproduction steps

  1. Put the grill in Celsius

Debug logs

hvac_modes:
  - heat
min_temp: 180
max_temp: 500
target_temp_step: 5
friendly_name: PBL-07BAD4C Grill temperature
supported_features: 1
current_temperature: 93
temperature: 93
hvac_action: fan

Diagnostics dump

No response

dknowles2 commented 5 months ago

I just published a new release, 2024.6.0, that should hopefully address this.

Feel free to reopen if it doesn't work. 😄

dknowles2 commented 5 months ago

Oh, I think I fixed a different bug. 😆

I think it's a similar problem with min/max temperature. I'll look at it later this week.

osokthedevil commented 5 months ago

that all good but i would like the climate.pbl_08d1f9c68298_grill_temperature that show In Celsius and would like it to show up as F instead. after updating the only thing i can adjust is the probe 1, 2 from C to F . \ image

dknowles2 commented 5 months ago

Okay, new release pushed that should fix this. Feel free to reopen if it doesn't.

NanouMu commented 5 months ago

Hi, I'm using the latest version 2024.6.1 and I now have a configuration error. I've tried deleting and reconfiguring but nothing works. Here are the error logs:

Enregistreur: homeassistant.config_entries
Source: config_entries.py:594
S'est produit pour la première fois: 11:49:42 (3 occurrences)
Dernier enregistrement: 12:08:17

Error setting up entry PBL-34AB957BAD4C for pitboss
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1249, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1281, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 131, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/pitboss/climate.py", line 34, in <module>
    class GrillClimate(BaseEntity, ClimateEntity):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 395, in __init__
    wrap_attr(cls, property_name)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 367, in wrap_attr
    raise TypeError(f"Can't override {attr_name} in subclass")
TypeError: Can't override _attr_max_temp in subclass

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/pitboss/__init__.py", line 57, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2031, in async_forward_entry_setups
    await integration.async_get_platforms(platforms)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1162, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1162, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1162, in async_get_platforms
    import_future.result()
  [Previous line repeated 2 more times]
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1150, in async_get_platforms
    platforms.update(self._load_platforms(platform_names))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1269, in _load_platform
    raise ImportError(
ImportError: Exception importing custom_components.pitboss.climate
Cette erreur provient d'une intégration personnalisée

Enregistreur: homeassistant
Source: custom_components/pitboss/coordinator.py:58
intégration: PitBoss (documentation, problèmes)
S'est produit pour la première fois: 12:09:28 (2 occurrences)
Dernier enregistrement: 12:09:32

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 363, in establish_connection
    await client.connect(
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 285, in connect
    wrapped_backend = self._async_get_best_available_backend_and_device(manager)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/habluetooth/wrappers.py", line 394, in _async_get_best_available_backend_and_device
    raise BleakError(
bleak.exc.BleakError: No backend with an available connection slot that can reach address 43:6C:B3:01:10:65 was found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/pitboss/coordinator.py", line 58, in reset_device
    await self.api.start()
  File "/usr/local/lib/python3.12/site-packages/pytboss/api.py", line 61, in start
    await self._conn.connect()
  File "/usr/local/lib/python3.12/site-packages/pytboss/ble.py", line 89, in connect
    self._ble_client = await bleak_retry_connector.establish_connection(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 472, in establish_connection
    _raise_if_needed(name, device.address, exc)
  File "/usr/local/lib/python3.12/site-packages/bleak_retry_connector/__init__.py", line 332, in _raise_if_needed
    raise BleakOutOfConnectionSlotsError(
bleak_retry_connector.BleakOutOfConnectionSlotsError: PBL-34AB957BAD4C - 43:6C:B3:01:10:65: Failed to connect after 10 attempt(s): No backend with an available connection slot that can reach address 43:6C:B3:01:10:65 was found: The proxy/adapter is out of connection slots or the device is no longer reachable; Add additional proxies (https://esphome.github.io/bluetooth-proxies/) near this device

Thank you

dknowles2 commented 5 months ago

That's saying your Bluetooth proxy is out of slots and is unrelated to this bug.

NanouMu commented 5 months ago

Hi, With the last version 2024.6.2, min and max temp à good. But now Grill Temp, Climat temp and Probes Temp are no longer good, whereas they used to be. Previously, HA was doing the conversion to celsius correctly on its own, as you can see in my first message. I think that with the latest version, there is a double conversion.

180°F > 82°C >27°

hvac_modes:
  - heat
min_temp: 82.2      <<<<< OK
max_temp: 260      <<<<< OK
target_temp_step: 1
current_temperature: 27      <<<<< should be 82
temperature: 27                     <<<<< should be 82
hvac_action: fan
friendly_name: PitBoss Grill temperature
supported_features: 1

Thank you

dknowles2 commented 5 months ago

What grill model do you have?

TTLucian commented 5 months ago

I think I have the same problem. Grill 1150PS2

hvac_modes:
  - heat
min_temp: 82.2
max_temp: 260
target_temp_step: 1
current_temperature: 2
temperature: 27
hvac_action: idle
friendly_name: Grill
supported_features: 1

There's no way that current_temperature is 2 degrees Celsius.

Is there any way to set the unit of measurement of the climate entity to Fahrenheit even though the system is using Celsius? It can be done for the probe sensors but not for the climate entity... Also, lots of connection issues. I've reverted to version 2024.5.0. It's the most stable version!

NanouMu commented 5 months ago

What grill model do you have?

I have the PB850PS2

dknowles2 commented 5 months ago

2024.6.3 has been pushed in https://github.com/dknowles2/ha-pitboss/releases/tag/2024.6.3

I think that should fix the double-conversion. Please re-open if it doesn't!