jason0x43 / hacs-hubitat

A Hubitat integration for Home Assistant
MIT License
191 stars 46 forks source link

Deleted devices in HE still show up in HA #190

Closed achecchia closed 1 year ago

achecchia commented 1 year ago

I am noticing that any device I delete from Hubitat or uncheck from the maker API still stay in Home Assistant and I can't delete the device, I have to disable it. I wish when I reload the integration, whatever is no longer in Hubitat would disappear from Home Assistant. Could this feature be added? I'm migrating my devices from HE to HA, and it's annoying to have duplicates in HA.

jason0x43 commented 1 year ago

It's possible to do that, but it could cause problems, so the integration takes a cautious approach. New devices are automatically added, but devices removed on the Hubitat side must currently be manually removed in HA. That's just to cover the case where some temporary issue with a device on the Hubitat side might cause Hubitat to stop reporting the device. If you were using a device in a bunch of automations, it would be a pain if the integration suddenly removed the device at some point.

You can fully remove old devices by running through the integration's config flow -- click the "CONFIGURE" button on the Hubitat integration card on the HA Integrations page, click "Submit", then you'll be able to select devices to remove.

achecchia commented 1 year ago

Thanks! This works great!