Custom Component: Hubitat

yeah, that makes sense. i havent made any changes to any entities, though, so im not sure. for some reason the dining table switch had a slightly different entity name, so i updated it to match what it should be. reloaded the integration and it worked! for like 2 minutes. then i had the same problem again.

looking at the logs i have a bunch of the same “unable to find entity” errors. i might remove the switch totally from hubitat and HA, reset the switch and pair it again, then share it back to home assistant. it feels like a communication issue between HA and HE but its not impacting every device for some reason so maybe that will start it fresh with the affected devices.

Hmmm…I’ve never seen that particular error. Home Assistant is receiving an event message from Hubitat, which is good, but it looks like it’s trying to send it to a stale/broken entity, which is very not good.

What version of the Hubitat integration are you running, and have you updated recently?

I removed 2 of them from hubitat, reloaded the HA integration, re-added it to habitat with a different name, added to the maker api, reloaded in HA and it seems good so far. The weird thing is i repaired one switch with the same entoty id as before and it kept acting weird. Repaired again with a new name and ID and it seems good. Now ive just got to rebuild a bumch of automations. At least itll be a good chance to clean them up and make them more efficient.

1 Like

Solved my own problem. Firewall rule from one IP was blocking http/s to the other. All fixed.

1 Like

I’ve been using my Hubitat solely to support ZWave devices and for the most part, everything works fine. However, after updating HA to 2024.3.0, I’ve lost access to my Honeywell T6 (set as a Generic Z-Wave Plus Thermostat) which has worked perfectly for years. Restoring to 2024.2.5 restores access to my thermostat. Has anyone else seen this problem and is there a fix?

I was seeing lots of unknowns for devices I bring over from Hubitat with yesterday’s release. I rolled back and everything is working fine.

This is fixed in the latest version (v0.9.24)

1 Like

how long does it take for HACS to update to the latest version?

Restart HA and you should see it.

Did something change with fans? All of my fans went offline in home assistant… noticed this in the logs:

ERROR (MainThread) [homeassistant.components.fan] Error while setting up hubitat platform for fan

Was working fine up until maybe a few updates of HA ago… did I miss a fix somewhere?

What version of the integration are you running?

i believe the latest… 0.9.26

Could you provide the rest of the error from the Home Assistant log? I just started up HA 2024.4.3, and I’m not seeing any issues with fans.

Thanks for looking at it!

This was from the homeassistant.log file… I notice the speed might have kicked the error… but to my knowledge… that speed has always been that way in the hubitat driver that I use…

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/hubitat/fan.py", line 172, in async_setup_entry
    create_and_add_entities(hass, entry, async_add_entities, "fan", HubitatFan, is_fan)
  File "/config/custom_components/hubitat/entities.py", line 39, in create_and_add_entities
    EntityClass(hub=hub, device=device) for device in devices_with_entity
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hubitat/fan.py", line 43, in __init__
    self.load_state()
  File "/config/custom_components/hubitat/fan.py", line 48, in load_state
    self._attr_percentage = self._get_percentage()
                            ^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hubitat/fan.py", line 69, in _get_percentage
    pct = ordered_list_item_to_percentage(self.speeds, speed)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/percentage.py", line 33, in ordered_list_item_to_percentage
    raise ValueError(f'The item "{item}" is not in "{ordered_list}"')
ValueError: The item "medium-high" is not in "['low', 'medium-low', 'medium', 'high']"```

Could you download your device’s capabilities (instructions) and post them here? I’d like to see what it’s reporting for its available fan speeds.

{
    "id": "420",
    "name": "HomeSeer Fan Controller FC200+",
    "label": "Great Room - Fan",
    "type": "HomeSeer Fan Controller FC200+",
    "room": "Great Room",
    "attributes": [
        {
            "name": "indicatorStatus",
            "currentValue": "when on",
            "dataType": "ENUM",
            "values": [
                "never",
                "when on",
                "when off"
            ]
        },
        {
            "name": "speed",
            "currentValue": "off",
            "dataType": "ENUM",
            "values": [
                "low",
                "medium-low",
                "medium",
                "medium-high",
                "high",
                "on",
                "off",
                "auto"
            ]
        },
        {
            "name": "supportedFanSpeeds",
            "currentValue": "[\"low\",\"medium-low\",\"medium\",\"high\",\"on\",\"off\"]",
            "dataType": "JSON_OBJECT"
        }
    ],
    "capabilities": [
        "Configuration",
        "Actuator",
        "Refresh",
        "FanControl",
        {
            "attributes": [
                {
                    "name": "speed",
                    "dataType": null
                },
                {
                    "name": "supportedFanSpeeds",
                    "dataType": null
                }
            ]
        },
        "Indicator",
        {
            "attributes": [
                {
                    "name": "indicatorStatus",
                    "dataType": null
                }
            ]
        }
    ],
    "commands": [
        "configure",
        "cycleSpeed",
        "indicatorNever",
        "indicatorWhenOff",
        "indicatorWhenOn",
        "refresh",
        "setSpeed",
        "setStatusLED"
    ]
}

Hmmm… The fan reports (via the “supportedFanSpeeds” attribute) that it supports “low”, “medium-low”, “medium”, and “high”. And yet it was apparently set to “medium-high”.

I’m guessing error you’re seeing is due to an update that was made to the fan platform in the integration a few weeks ago to properly support the “supportedFanSpeeds” attribute. Ironically enough, the update was made because some fans were having issues when HA tried to set them to speeds they didn’t support. In this case, it kind of looks like Hubitat is reporting the fan to be set to a speed that the fan doesn’t say it supports.

I published v0.9.27 with a workaround for that behavior. See if that resolves the error you’ve been seeing (and verify that your fans still work as intended :smile:).

looks like it works! thanks for the update!

Is there anything on Hubitat end that can improve this integration?
Faster MakerAPI responses, different response format, some annoying quirks, general coding help?
Please PM me… I haven’t been posting so can’t PM people yet.

1 Like