Custom Component: Hubitat

I don’t think HA has a valve type, but I’ll have to look more into it.

There’s no allowance for custom parameters and commands at the moment. Probably the best approach would be for the integration to emit all the events it receives from Hubitat on HA’s event bus (right now it only emits events for button pushes), and for it to provide a service to let users send arbitrary commands to the hub. Between those, you should be able to do anything via the integration that you can do through the Maker API.

Makes sense, thanks. There are definitely a lot of custom commands and attributes floating around out there. Even on something “normal” like the GE Motion Dimmers/Switches there are a plethora of custom commands like those that change the motion sensor triggering the light on/off behavior (Manual vs Occupancy vs Vacancy) and pre-staging the dimmer level on some dimmers.

Something to think about long term. Rome wasn’t built in a day, and all that.

I’m just tickled that I have 100+ more devices in HA now, with almost no work. Yeah, there are a few gaps in function, but 90%+ of it is already there!

Oh, and does the integration support multiple hubs? Meaning, if I wanted to bring devices from two different hubs can I setup 2 integrations in HA?

I forgot that the slider-entity-row isn’t built into Lovelace.
If you don’t have it @JasonJoel I highly recommend it.
It’s available in HACS.

Also works for media players and other things:
image

3 Likes

HA actually exposes two different brightness properties; brightness (0-255) and brightness_pct (0-100). Took me awhile to get my head around that as well.

Valves fall into the opening device class as they are basically a switch to HA.

2 Likes

I actually stopped using brightness_pct because it is going to be deprecated in scenes (which leads me to believe it may be elsewhere as well).
I don’t want to have to hunt down code in my config in the future (had to do this once already and it wasn’t fun). Just an fyi…see thread below.
Deprecated attributes in scene?

1 Like

Theoretically, yes. I haven’t actually tested that, though.

That’s… frustrating…

1 Like

Version 0.4.9

This release lets you specify the temperature units used by the integration. They should match whatever is set in Hubitat’s global settings; otherwise the integration will misinterpret temperature sensor values from Hubitat. The default units are Fahrenheit.

You can set the units in the integration options in the UI.

3 Likes

Speaking of temperature. Depending on the sensor, HE reports the temperature up to the hundredths position. When I was using mqtt and manually adding the devices to yaml. I used a value template to round to the nearest whole number. Would it be possibly to add this as a integration option? Something like report temp as is, or round to the nearest whole number? Maybe options like this: (00.00) (00.0) (00). I know for me, i’m always going to want it rounded to the whole number but others may want that granular detail.

Thinking about it more, I have other sensors now that reports tenths (battery, humidity). Maybe a global option for any sensor data that report decimals?

Hmmm…that’s certainly possible, but rounding for display purposes should really happen in the front end, not in the output of the sensor.

1 Like

Note to those that don’t follow the Hubitat forums. Bruce is going to update the Maker API documentation, so if you know of any undocumented Maker API endpoints that you would like to be documented/become official, make sure you get a list of them to Bruce soon.

I already forwarded these two to him:

  1. Mode
  • http//[ip]:[port]/apps/api/[appId]/modes?access_token=[token]
  1. List of all devices with specific attribute
  • http://[ip]:[port]/apps/api/[appId]/attribute/[attribute]?access_token=[token]
2 Likes

Agree. Obviously fine with rounding OPTIONS in the integration, if others want/need it.

I want the raw value decimals, though, so wouldn’t want it forced.

Interrresting… Is there a topic for that in the Hubitat forums?

It’s part of the NodeRed thread.

1 Like

Thank you for your work on this! It was one of the simplest integrations I have done!

2 Likes

@jason0x43 @JasonJoel I didn’t think of that. I agree with both of you. It is only for display purposes. I’ll have to figure out howto have it only display the whole number and not the decimals.

Just FYI, I’m going to be out of town for the next week, so I may not be replying much. :airplane:

1 Like

I’ll have to queue my lock troubleshooting till you get back.
I don’t have useful data to supply or testing results to share so it’ll have to wait.
Hopefully you’re traveling away from the cold. :wink:

So I’ve been going back and forth on different Z-wave/Zigbee hubs to get and originally was going to go with smart things, but ruled it out because of the internet connection requirement.

Lots of people in here have been helpful in gathering info (in other threads as well). This thread in particular is solidifying Hubitat as a viable option for me. I’m a programmer, so writing code to extend functionality for HA or Hubitat isn’t really an issue, but it’s great to work with already started projects I can contribute to, like this one.

Being able to control all my stuff through HA and node-red is a requirement.

Anyone want to chime in with advice?

I’ll be gathering random devices (door/contact sensors, remotes/switches, etc. I’ll probably keep my lighting through the Hue bridge). I’m also going to be making my own esp32 and zigbee devices, but that shouldn’t be a factor in which hub I end up getting.

1 Like