Custom Component: Hubitat

I want from the stock driver description in Hubitat’s docs (and the virtual fan driver), which has speeds of off, low, medium-low, medium, medium-high, and high, which I mapped to 0, 20, 40, 60, 80, and 100.

If you can post the capabilities of your device, I can try to deal with it more accurately.

Actually the integration should be using whatever speeds the fan says it supports, but I was only able to test with the virtual fan driver.

I am using the GE Smart Fan Control and it has settings for low/medium/high. I checked anc verified that all of my fans are sitting in the 3 speed bucket you created. Thanks!
“name”: “GE Smart Fan Control”,
“label”: “Office Fan”,
“type”: “GE Smart Fan Control”,
“id”: “33”,
“date”: “2022-07-12T03:53:09+0000”,
“model”: null,
“manufacturer”: null,
“room”: null,
“capabilities”: [
“Configuration”,
“Actuator”,
“Refresh”,
“FanControl”,
“SwitchLevel”,
“Switch”,
“PushableButton”,
“DoubleTapableButton”
],
“attributes”: {
“supportedFanSpeeds”: “[“low”,“medium”,“high”,“on”,“off”]”,
“dataType”: “NUMBER”,
“values”: null,
“doubleTapped”: “1”,
“numberOfButtons”: “2”,
“pushed”: “1”,
“speed”: “off”,
“switch”: “off”,
“level”: “25”
},
“commands”: [
{
“command”: “configure”
},
{
“command”: “cycleSpeed”
},
{
“command”: “doubleTap”
},
{
“command”: “off”
},
{
“command”: “on”
},
{
“command”: “push”
},
{
“command”: “refresh”
},
{
“command”: “setLevel”
},
{
“command”: “setSpeed”
},
{
“command”: “setSpeed”
}
]
}

Hey there, love this. Works great!

I have most things working, but I added a Zigbee contact sensor I have and it just shows closed all the time. Any ideas?

My setup before

Zigbee Contact Sensor > Hubitat > HomeBridge > Homekit = Works

Now

Zigbee Contact Sensor > Hubitat > HomeAssitant > Homekit = Closed all the time

Any ideas? I just did the default install and skipped all the optional stuff

EDIT:

I wonder if this is where I’m going wrong. Does it need a specific port?

EDIT2: I figured it out. I had given HomeAssistant a static DHCP mapping but I had not yet rebooted the VM for it to get its new lease, I suppose Hubitat was trying to talk to it via its new IP or DNS name. Rebooted the VM, then just ran through the config again on HA, and bingo it works great

Thanks!

1 Like

Hi ,
tried and start reading this topic thread but finally noticed it is 1104 massages LOL .
Is there instruction on how to integrate HE into Home Assistant ?
In the beginning of this topic it mention that there is an MQTT integration coming so and here it uses Maker API .
So which way is the best to use.
FYI, new to home assistant just install

There is a link to a README file in the first post that has all the instructions.

The MQTT based integration is a different thing than this integration. My recollection is that the MQTT one runs on the Hubitat itself. There’s information on that one available at:

and

1 Like

Thanks so much

Can you say which solution is best ?
Can you tell the pros and cons of each ?

Well, from looking at the MQTT solution’s GitHub page, it has not been updated for years. Perhaps it has not needed any updates…but probably most folks have moved over to @jason0x43’s integration instead? Just a guess based on the lack of both GitHub and Hubitat forum activity.

@jason0x43’s Hubitat Integration has been working well for me, and he is still actively supporting it.

1 Like

OK sounds good i give this method a try thx

I’m in the same boat as you, but maybe a few days ahead

I used the Maker API, working great so far

Full instructions:

1 Like

I’ve got a Sengled Element Color Plus bulb properly connected to Hubitat. For some reason this one bulb is only showing Home Assistant the ability to turn it on and off and adjust the brightness. It is not showing HA that it has any color options. There are other bulbs in my Hubitat that DO show HA color options, so I know it is supposed to work. Any ideas what I might do to make this work? I’m slowly moving everything over to Home Assistant. I’m not particularly impressed with the Zigbee integration, so I’m using this component to use my Hubitat hubs as a Zigbee hub. With the exception of this bulb, it’s working great! Thanks for your help!

EDIT - It appears that my question may be actually a different one. After even more digging, I discovered that I CAN adjust this light’s color from Home Assistant, but ONLY by clicking on the device itself and going in to the settings. Can I create and entity that will allow me to make these adjustments from an automation? Of course, now maybe the question no longer belongs here?

Hmmm…I’m not quite sure what you mean here. Your light should have a device in HA with an associated entity. You may or may not have an entity card for the light on your dashboard; it depends on how HA is setup (if HA is controlling your dashboard or it’s being manually configured). If there is an entity card for the light, it should be behaving like the entity cards for other lights coming from Hubitat. Tapping it should open the controls for the light. But…occasionally a light from Hubitat won’t actually look like a light, so the integration may be doing something weird.

If you can paste the capabilities of your device here, or open an issue on GitHub and paste them there, I can see if anything looks problematic.

I’m don’t quite understand what are you talking about here. Do you have an working example configuration.yaml I can take a look at to get HSM working in HA?

HSM already works, in the sense that there’s a sensor for the HSM state and a service to update the state. You could create a dashboard panel that displays the hub’s HSM status, and that has buttons to call the hubitat.set_hsm service for each of the HSM states you want to be able to use.

To create an alarm control panel entity for the HSM state, you could add an alarm_control_panel template to your configuration.yaml, similar to the example in the documentation:

alarm_control_panel:
  - platform: template
    panels:
      hubitat:
        value_template: >-
          {% if is_state('sensor.hub_hsm_status', 'armedNight') %}
            armed_night
          {% elif is_state('sensor.hub_hsm_status', 'armedHome') %}
            armed_home
          {% elif is_state('sensor.hub_hsm_status', 'armedAway') %}
            armed_away
          {% elif is_state('sensor.hub_hsm_status', 'allDisarmed') %}
            disarmed
          {% else %}
            {{ states('sensor.hub_hsm_status') }}
          {% endif %}
        arm_away:
          service: hubitat.set_hsm
          data:
            command: armAway
        arm_home:
          service: hubitat.set_hsm
          data:
            command: armHome
        arm_night:
          service: hubitat.set_hsm
          data:
            command: armHome
        disarm:
          service: hubitat.set_hsm
          data:
            command: disarmAll

Refresh template entities from the Developer Tools → YAML panel, or restart HA. Then add an alarm control panel entity to the dashboard for the entity created above.

I’ve opened an issue for automatically creating an alarm_control_panel when HSM is enabled.

3 Likes

Thank you, much appreciated!

UPDATE: I added 2 lines to hide the keypad, since we don’t need the keypad (unless I missed how to add security code for HSM):

alarm_control_panel:
  - platform: template
    panels:
      hsm:
        code_format: no_code # new
        code_arm_required: false # new
        value_template: >-
          {% if is_state('sensor.hub_hsm_status', 'armedNight') %}
            armed_night
          {% elif is_state('sensor.hub_hsm_status', 'armedHome') %}
            armed_home
          {% elif is_state('sensor.hub_hsm_status', 'armedAway') %}
            armed_away
          {% elif is_state('sensor.hub_hsm_status', 'allDisarmed') %}
            disarmed
          {% else %}
            {{ states('sensor.hub_hsm_status') }}
          {% endif %}
        arm_away:
          service: hubitat.set_hsm
          data:
            command: armAway
        arm_home:
          service: hubitat.set_hsm
          data:
            command: armHome
        arm_night:
          service: hubitat.set_hsm
          data:
            command: armHome
        disarm:
          service: hubitat.set_hsm
          data:
            command: disarmAll

I just created my keypad using this as well, however I changed the disarm command to disarm instead of disarmAll as I didn’t want it to disarm my custom (temperature) alerts. I also had to change the arm_night command to armNight instead of armHome to get it to arm night.

Thanks.

Can some one help me? I did some thing stupid when i was messing with my Maker API in HE. I changed my Access token, so now my Hubitat integration is no longer working. For the life of me, i can not seem to figure out where i should update this in HA?

1 Like

I looked through the documentation, and it appears the only time you can add the Access Token is during the initial setup of the integration. That might mean you would have to uninstall the integration and then start from scratch. I’m not sure what that would mean for all your entities/devices and any automations that use them, so I’m hoping someone can confirm or refute my read of things before you go to the drastic step of uninstalling the entire integration.

You are correct – there isn’t a currently a way to change the access token. The access token (a part of it, at least) is the primary identifier for an instance of the integration, and the unique IDs for all devices and entities created for a hub are based on the access token.

1 Like

Ok, thanks. I deleted the Integration and then reinstalled it. It did carry over my devices but i had to figure out which was which, and then rename them back to their original names. I had to redo all of the automations/scenes that they were part of.