Home Assistant - MQTT Exporter Issue

In Hubitat 2.4.4 MQTT export to Home Assistant, some humidity devices publish HA discovery/state metadata as %RH or % RH while others publish %.

Home Assistant accepts % for humidity but rejects %RH / % RH, causing MQTT humidity entities to fail validation and lose long-term statistics compatibility.

Sounds like a driver implementation issue not a hub wide issue. What drivers are being utilized by the devices with erroneous reporting?

3 Likes

Yep it was - I forgot I had custom drivers I setup for my humidity sensors that calculated the dew point. I updated the the drivers values flowed correctly into Home Assistant. Thanks @thebearmay!

2 Likes

I'm having the same issue but I'm just using the Generic Zigbee Temperature/Humidity Sensor driver. It does %RH so the temp shows up in Home Assistant but the humidity doesn't.

Tagging @mike.maxwell

Hubitat's standard is that the Relative Humidity unit is %rh, not just a percentage sign :

For compatibility with Home Assistant, I suppose that the substitution must be implemented into the MQTT Export Integration (beta) @gopher.ny

5 Likes

Next (beta) build.

1 Like

Great news. I've converted almost everything on my smaller shop setup that uses a C7 to using MQTT Export and it's working great. The only thing I ran into so far was this and that the hub itself doesn't come across into HA automatically even though it's sending to MQTT. I think the latter problem I just need to create a definition in HA, I just didn't get a chance yet.

What is the use case for importing the hub itself? Not bashing the idea here, I just don't understand :slight_smile:

We don't want to have the hub appearing as a "bridge", just want to export devices. The original idea was to do MQTT for the commercial users with multiple/many hubs, at which point it became "well, why not make it HA compatible since it's already there".

I might be weird but I liked the Modes feature of Hubitat so I replicated it in Home Assistant. So when HA changes Modes I also write those mode changes back to my Hubitat hubs. Changing the mode is the only thing I would use the hub itself in MQTT for.

1 Like

Thanks for including these changes! My humidity is now showing correctly through MQTT to HA and I can see and control the hub mode.

1 Like