Custom Component: Hubitat

Locks working great! I also had to completely install the HACS component. All good though.

Two small things

  1. The get code service doesn’t seem to work. I am using “position: 1” but it’s not returning anything.
  2. Would it be possible to return the code used? This may require that LCM be running on HE but my MakerAPI shows this:
{"device_id":"194","label":"Front Door","name":"lastCodeName","value":"Main Code","date":"2020-02-22T23:24:01+0000","unit":null,"isStateChange":null,"source":"DEVICE"},

Which is great for automations so you know which code was used and it also helps differentiate a code entry vs an unlock from the inside or via z-wave.

I’m loving this so far though!

You can just reinstall without uninstalling.

That didn’t work for me, I was previously on 0.44

The get code service currently just logs the code to the console; see if a message shows up there. Not that useful, I know; I based that behavior on Home Assistant’s own z-wave lock, which was the only other one I saw that dealt with user codes, and it just appeared to log the code. I’ll see about outputting something more useful.

I’ll update locks to emit an event when an unlock occurs with information about how the unlock happened.

What version of HACS are you using?

It broke for me.

One of the errors

Log Details (ERROR)

Sun Feb 23 2020 08:38:25 GMT-0600 (Central Standard Time)

Unable to prepare setup for platform hubitat.lock: Platform not found (cannot import name 'ATTR_CODE_LENGTH' from 'hubitatmaker' (/usr/local/lib/python3.7/site-packages/hubitatmaker/__init__.py)).

I’ve just installed and setup HACs. But I already had your fantastic Hubitat Integration installed. Should I remove it before I install it through HACs?

It looks like the hubitatmaker package didn’t get updated. Some quick things to check, just try to figure out what’s going on:

From a terminal on your Home Assistant instance, run pip list and see what version is shown for hubitatmaker. It should be 0.2.5 or higher.

Also from the terminal, in your HA config directory, look at custom_components/hubitat/manifest.json. It should have a line like:

  "requirements": ["hubitatmaker>=0.2.5,<0.3.0"]

If one or both of those isn’t true, HACS didn’t fully update the integration. Probably the easiest fix is to hit the “REINSTALL” link for the integration in HACS.

1 Like

If HACS will let you install the integration over an existing copy, that will probably work (I’ve never tried that myself).

Reinstall worked!

This component gets better and better every day. I’m almost to the point where I wont need to use the mqtt bridge I have setup.

I have two fan devices that are showing up as on/off switches. Based on their capabilities, would you be able to add them? Currently I have them in HA via mqtt birdge and they are configured using the ‘fan.’ domain for the entities.

Hampton Bay Zigbee Fan Controller

{"id":"37","name":"Hampton Bay Fan Component","label":"Living Room Ceiling Fan","attributes":[{"name":"level","currentValue":75,"dataType":"NUMBER"},{"name":"speed","currentValue":"off","dataType":"ENUM","values":["low","medium-low","medium","medium-high","high","on","off","auto"]},{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]}],"capabilities":["Switch",{"attributes":[{"name":"switch","dataType":null}]},"SwitchLevel",{"attributes":[{"name":"level","dataType":null}]},"Refresh","Actuator","FanControl",{"attributes":[{"name":"speed","dataType":null}]}],"commands":["cycleSpeed","off","on","refresh","setLevel","setSpeed"]}

GE Z-Wave Plus Fan Control switch

{"id":"611","name":"GE Z-Wave Plus Fan Control","label":"Office Ceiling Fan","attributes":[{"name":"doubleTapped","currentValue":2,"dataType":"NUMBER"},{"name":"level","currentValue":99,"dataType":"NUMBER"},{"name":"numberOfButtons","currentValue":2,"dataType":"NUMBER"},{"name":"pushed","currentValue":1,"dataType":"NUMBER"},{"name":"speed","currentValue":"off","dataType":"ENUM","values":["low","medium-low","medium","medium-high","high","on","off","auto"]},{"name":"speed","currentValue":"off","dataType":"ENUM","values":["low","medium-low","medium","medium-high","high","on","off","auto"]},{"name":"switch","currentValue":"off","dataType":"ENUM","values":["on","off"]}],"capabilities":["Switch",{"attributes":[{"name":"switch","dataType":null}]},"Configuration","SwitchLevel",{"attributes":[{"name":"level","dataType":null}]},"Refresh","Actuator","FanControl",{"attributes":[{"name":"speed","dataType":null}]},"PushableButton",{"attributes":[{"name":"numberOfButtons","dataType":null},{"name":"pushed","dataType":null}]},"DoubleTapableButton",{"attributes":[{"name":"doubleTapped","dataType":null}]}],"commands":["configure","off","on","refresh","setLevel","setSpeed"]}

Fans are definitely doable. I’ve created https://github.com/jason0x43/hacs-hubitat/issues/23 for adding fan support.

So silly question time, as I haven’t tried the integration yet (have all my logic in Node-Red, but am also a HA user)… How does it handle multi-function devices?

Prime example - GE Motion Dimmer… Is a dimmer, and a motion sensor, in one device.

I’ll just try it and find out for myself sooner or later - just haven’t had much time lately.

Home Assistant has “devices”, which represent a hardware device, and “entities”, which represent some capability of a device. Entities are what you actually deal with in automations; they have state and provide commands. A device like a motion dimmer would end up with two entities in HA: a motion sensor (e.g., sensor.my_dimmer_motion) and a light (e.g., light.my_dimmer).

1 Like

Thanks. That is what I would have assumed/hoped for, but I wasn’t sure how robust the discovery and mapping process currently was.

I’ll have to find time and set it up - seems straight forward enough!

I dont have the dimmer, but I do have the regular GE Motion Switch. Works great:
image

1 Like

Thank you sir! I really appreciate all the work you have put into this component!

1 Like

Has anyone upgraded to Hubitat V2.1.9 using this component?
I thought somebody said there was an issue with it but I can’t find evidence of this by quickly browsing.

I have, and haven’t noticed any problems.

1 Like

Awesome, thanks!