tomaae / homeassistant-truenas

TrueNAS integration for Home Assistant
Apache License 2.0
183 stars 16 forks source link

[Bug] Temperature Units #135

Closed Frankenberrypi closed 5 months ago

Frankenberrypi commented 8 months ago

Describe the issue

Unit conversions don't seem to be working correctly for temperatures. My home assistant instance used Fahrenheit for temperature units, it seems that temperatures are brought in without units and assumed to be in °F without conversion, despite actually being in °C.

How to reproduce the issue

Set HA units to F, connect a TrueNAS device.

Expected behavior

Temperatures from TrueNAS should probably be assigned units of "C" when they are created to HA can convert them as required.

Screenshots

image image

Software versions

tomaae commented 8 months ago

I'm pretty sure this should work in master. Can you test?

Frankenberrypi commented 8 months ago

I deleted the integration entry, did a re-download with "master" selected, followed by a restart and re-setup of the integration. The behavior seems to stay the same. From the debug log:

    "truenas": {
      "version": "0.0.0",
      "requirements": []
    }

...and

        "ada8": {
          "name": "ada8",
          "devname": "ada8",
          "serial": "**REDACTED**",
          "size": 3000592982016,
          "hddstandby": "ALWAYS ON",
          "hddstandby_force": false,
          "advpowermgmt": "DISABLED",
          "acousticlevel": "DISABLED",
          "togglesmart": true,
          "model": "ST3000VN007-2E4166",
          "rotationrate": 5900,
          "type": "HDD",
          "temperature": 33
        }

image

tomaae commented 5 months ago

tested in master, works fine