[RELEASE] Home Assistant Device Bridge (HADB)

I’ve managed to set up an ESP32c with a MAX6675 thermocouple sensor using ESPHome Builder, and bring it into Hubitat via HADB. Which is amazing in itself.

Importing works fine EXCEPT for the accuracy (places after the decimal point). I have it displayed to whatever I want in HA, but in the dashboard, it goes crazy with a million digits after the decimal point, (below). I’ve also tried changing the config (below).

Is there any way to round it off to one or zero places? CSS, I suppose? Thanks.

I found one solution from @wiegout from several years back involving creating a virtual temp sensor, and a rule to round off the output when the real temp sensor’s value changes. I agree with @wiegout , it is hinkey.

I would try to do the rounding in ESPHome - somehow in the “x * (9.0/5.0) + 32.0” equation, if possible. Might be best to ask over in the HA forum, under the ESPHome category.

Maybe something like this

so, it would become

return roundf((x * (9.0/5.0) + 32.0) * 10.0) / 10.0;

It’s really weird. I think I did the coding in the configuration correct in HA, it displays correctly in HA. It’s just that when it gets brought over into Hubitat that the number expands.

Edit. Perhaps there are more configurations that can be put in the filter section in HA. I’ll check that out too.

See my edit above

1 Like

Thanks. I saw a similar solution from bruce from years ago in Hubitat for the virtual sensor I noted above. An issue was displaying the decimal places when zeros were involved. Not that it would be a factor here. I’ll try that in HA and see if it has an effect, compared to the filter.

edit: Nope. Same. It’s funny how the wacky numbers alternate with a reasonable display. So, ten seconds good, then bad, and so on.

Need some help here, I updated my Home Assistant to a new computer everything was fine, I have a C8 pro all latest software updates, when I booted the new computer with home assistant I lost all my home assistant devices from the bridge, I updated the token, that didn’t work I uninstalled it that didn't work, Any suggestions would be appreciated. It appears when I reloaded the app on the Hubitat, but it will not show any devices in the home assistant as before . stumped.

Does the new computer have a different IP address than previous Home Assistant host?

This delete all children devices :worried:

If @maranosal has a recent Hubitat Backup, they could restore that to their HE hub to get all of the HADB child devices back.

Yep the up is the same on home assistant I may try a back up restore on the Hubitat I have one from last night

So I did a restore on the Hubitat, Got the devices but it still will not connect to Home Assistant, here are some screen shots of what is happening,

Make sure your access token is the right one.

Well I am back on line now, I had to restart the router and reboot the systems and they came back on line, I guess the Mac address was different in the Hubitat to attach itself by clearing the cache on the routers even thought the IP address was the same, the router was still giving the wrong address to the home assistant as it called for by Hubitat. My only guess, man that was a bit of a hair raising thing having to rebuild all those connections and rules. gee wiz updating systems can be a bit of a issue.

Thank for the help folks.

1 Like

Another strategy is to use the round function within a filter. I use this on a number of devices including some I bring into HE

Example configuration entry

filters:

  • round: 1 # will round to 1 decimal place

Edit: should be a dash instead of a dot. Can’t turn off the auto-formatting!

1 Like

In case anyone wants it, here’s the rule that does the rounding and puts it into a virtual temp sensor called “Backyard”. I use Backyard in human friendly places like dashboards and for asking Alexa “Alexa what’s the backyard temperature” and I get the actual WittBoy temp from our weather station but rounded to a whole degree.

2 Likes

Thanks. @wiegout , I used your rule. It would be nice to streamline it though, and have it come through without needing to be modified. Every minute I get this:

I’ll likely fool around with the yaml some more.

2 Likes

HADB try to use inbuilt component when possible, which is the case with temperature devices. Nonetheless, I encountered a similar situation where a sensor was too accurate for my liking. I personnaly use a modified component for these. I just uploaded them to Github for you to try if you want. It allow to select the number of decimal you wish to display.

https://raw.githubusercontent.com/ymerj/Hubitat-miscellaneous/refs/heads/main/HADBgenericComponentTemperature.groovy

https://raw.githubusercontent.com/ymerj/Hubitat-miscellaneous/refs/heads/main/HADBgenericComponentHumidity.groovy

4 Likes

Hello all. First post here and only 20 hour into using HE. I’m trying to get this Bridge installed and it just won’t show up in in the installed apps. I was able to get package manager installed and I think I understand how to install user apps and drivers, but this app won’t show up in apps after I’ve installed the drivers and the app then tried to add user app. I’m sure it’s something very simple but I’m scratching my head on it. Thanks!

Try add user integration instead (integrations in the side menu just bellow apps)

1 Like