Custom Component: Hubitat

Looking for disconnected devices through the UI is the best way I know of at the moment (entities in the UI entity list will be flagged if they’re disconnected / inactive). The registry is also good (and faster) if you know beforehand what to remove.

As for the light vs switch classification, that depends on the capabilities reported by the driver and the label of the device. If a device reports that it supports the Light capability, it will be classified as a light. If it just reports itself as a switch, the integration will check if the label looks like the name of a lighting device (lamp, light, candle, chandelier, etc.); if so, it’s a light. Otherwise it’s a switch. I’d guess that the generic drivers were reporting a Light capability and the custom ones are not.

The integration should ideally be checking for existing entities with a given device ID and updating them rather than creating new entities. I’ll open an issue for that…

Cool, as it’s hard to complete automations right now as I don’t know which event is which.

Do you know where I look into parsing out the bad ones?

If you look in the entities list (Configuration → Entities), the invalid entities will have a red exclamation point icon (!) at the right side of the entity indicating that they’re unused.

I only have 2 that look like that. Mine look like this:

It’s odd that some switches are OK others have that circle/exclamation point.

I’d expect to see the exclamation point for entities that used to register as switches and are now registering as lights. The light entity is fine, but the switch entity is unavailable.

I may have messed things up trying to scrub the configuration files for devices and entities. Some have both light/switch, some are just light and some just switch. It’s very odd, but I’m a bit nervous to delete anything out of the files again.

Is there a clean way to scrub it and let your integration re-fill HA?

The safest thing is to go through the entity list in the UI and delete any unavailable entities. Any missing entities will be recreated when you restart HA.

Are the arrow circles with exclamation points mean unavailable? The only exclamation point I have right now is my phone’s alarm, probably because I have no alarm set or defined.

If you suspect you may have messed things up trying to scrub the config files, I’d do exactly what you’re looking to do. And it’s pretty easy.

Uninstall the Hubitat integration.
Go to your entities list (Configuration → Entities) and search Hubitat.
This should give you a complete list of any entities that may be left over. Delete them all.
Reinstall the Hubitat integration

1 Like

I removed all the ones with the circle/exclamation point. So far so good, except now some light switches are reported as switch and some as light. Seems jumbled right now, I probably removed a wrong entity at some point, but everything seems to be working.

switch vs light is based on what the hubitat driver exposes. Not much you can do there. I just took a look and all of mine are coming through as light, I’m using inovelli and ge switches. Just look at it this way… it technically is a light SWITCH right? :wink:

I’ve been so satisfied by everything lately I’ve been snoozing on this thread but I’m pretty sure the integration analyzes the device name and if it has certain text in the device label it will make it a light.
Like lights, light, bulb maybe, I know I had sconce added because I’m special lol.

Yeah, it’s a combination of the two. If there’s something in the device capabilities that definitely indicates a light (like, it advertises the Light capability), it’s a light. If the device is ambiguous, the integration looks for a term in the label that indicates the device is a light (e.g., “Bedroom Lamp”, “Chandelier”, “Hall Light”). If it’s label looks like a light, the integration makes it a light. Otherwise, it ends up as a regular switch.

5 Likes

Hello! I am looking for some serious help! :slight_smile:

I have been around the home auto space for years, on ST, HE and HS. Trying out HA as it appears to be the only platform with a working SimpliSafe (SS). I got HA deployed on a rPI I had hanging around and connected with SS! From the HA overview I can interact with SS. Excellent.

Now I just want to drive the control from Hubitat. Like others, I am not finding the ability to install this from the green plus on the Integrations page. After that, the other instructions under MANUAL in the README are over my head as someone brand new to HA.

Can someone please guide me to how I set up this integration? Much appreciated. I seem to be missing some 101 notes!

Any idea why my repeater is a switch? Maybe because it can be turn on and off?

I guess it doesn’t matter too much if a light is a light or a switch, except to keep straight which events you’re looking at. Also, the dashboard for a light colors when it’s on, but the lightening bolt for a switch doesn’t.

There’s not much more to it than the manual install in the readme says. You clone the github repository to custom_components/hubitat folder on your home assistant device and reboot. Done.

OR you can install via HACS. I’d recommend setting up HACS because you’ll undoubtedly use it in the future. Think app store for home assistant.

Well…the community app store anyway.

The HA Integrations page is for built in integrations, but this is a custom integration. HACS is the easiest way to manage this integration (and many other custom integrations) in the long run, although you’ll have to manually install HACS.

Here I am going to expose my pure noob. :smiley:

Where is my configuration.yaml and how do I edit it? Seems this instruction is in both options of installing HACS or cloning the github.

I set up an rPI following clear and direct instructions (read: I really do not understand all I did, but followed along). Do I need to shut down my rPI, pull the SD card and edit it each time I want to make a change to this config.yaml? Looking around it seems 90% of automations involve editing files.

I really appreciate anyone sticking in with me and helping out! :slight_smile:

You have a couple options. If you’re running the full HA install on a rPi, you can go into Supervisor -> Add-on store and install the Samba share add-on, which will let you access HA’s file system over the network. Once you’ve installed that and configured it, you should be able to browse to your HA like any other computer over your local network.

One of the folders shared by HA is the config folder. In there is your configuration.yaml file. That’s also where you’ll put custom components like HACS (at config/custom_components/hacs).

Note that you’ll need to restart HA for any changes to your configuration.yaml to take effect.

1 Like