Custom Component: Hubitat

Ah, never mind, I had just started HA with an in-progress version of the integration. v0.9.23 loads with the latest HA (2024.2.4), at least on my local system.

@jason0x43 Here’s a full log after rebooting.

Summary

2024-02-26 18:16:47.783 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-02-26 18:17:05.897 WARNING (MainThread) [homeassistant.setup] Setup of hassio is taking over 10 seconds.
2024-02-26 18:17:06.139 WARNING (MainThread) [homeassistant.setup] Setup of bluetooth is taking over 10 seconds.
2024-02-26 18:17:13.471 ERROR (MainThread) [homeassistant.setup] Setup failed for ‘hubitat’: Integration not found.
2024-02-26 18:17:20.363 WARNING (MainThread) [homeassistant.setup] Setup of zone is taking over 10 seconds.
2024-02-26 18:17:20.364 WARNING (MainThread) [homeassistant.setup] Setup of input_boolean is taking over 10 seconds.
2024-02-26 18:17:20.364 WARNING (MainThread) [homeassistant.setup] Setup of schedule is taking over 10 seconds.
2024-02-26 18:17:20.364 WARNING (MainThread) [homeassistant.setup] Setup of input_text is taking over 10 seconds.
2024-02-26 18:17:20.364 WARNING (MainThread) [homeassistant.setup] Setup of input_button is taking over 10 seconds.
2024-02-26 18:17:20.365 WARNING (MainThread) [homeassistant.setup] Setup of tag is taking over 10 seconds.
2024-02-26 18:17:20.365 WARNING (MainThread) [homeassistant.setup] Setup of input_select is taking over 10 seconds.
2024-02-26 18:17:20.365 WARNING (MainThread) [homeassistant.setup] Setup of input_datetime is taking over 10 seconds.
2024-02-26 18:17:21.149 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘Nite Nite HA’ failed to setup triggers and has been disabled: Unknown device ‘c6dc4eb6f5c00b700c5f1f244961167b’
2024-02-26 18:17:21.474 ERROR (MainThread) [homeassistant.components.script] Blueprint ‘Confirmable Notification’ generated invalid script with inputs {‘notify_device’: ‘95991889fa1e1cc97e15cd10ca84c59c’, ‘title’: ‘Dismiss’, ‘message’: ‘message body’, ‘confirm_text’: ‘Dismiss’}: Unknown device ‘95991889fa1e1cc97e15cd10ca84c59c’
2024-02-26 18:17:23.761 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class ‘custom_components.hacs.update.HacsRepositoryUpdateEntity’>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <UpdateEntityFeature.INSTALL|PROGRESS|RELEASE_NOTES: 21>, please create a bug report at Issues · hacs/integration · GitHub and reference Deprecating all magic numbers for supported features | Home Assistant Developer Docs
2024-02-26 18:17:23.766 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class ‘custom_components.hacs.update.HacsRepositoryUpdateEntity’>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <UpdateEntityFeature.INSTALL|PROGRESS|RELEASE_NOTES: 21>, please create a bug report at Issues · hacs/integration · GitHub and reference Deprecating all magic numbers for supported features | Home Assistant Developer Docs
2024-02-26 18:17:23.770 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class ‘custom_components.hacs.update.HacsRepositoryUpdateEntity’>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <UpdateEntityFeature.INSTALL|PROGRESS|RELEASE_NOTES: 21>, please create a bug report at Issues · hacs/integration · GitHub and reference Deprecating all magic numbers for supported features | Home Assistant Developer Docs
2024-02-26 18:17:23.772 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class ‘custom_components.hacs.update.HacsRepositoryUpdateEntity’>) is using deprecated supported features values which will be removed in HA Core 2025.1. Instead it should use <UpdateEntityFeature.INSTALL|PROGRESS|RELEASE_NOTES: 21>, please create a bug report at Issues · hacs/integration · GitHub and reference Deprecating all magic numbers for supported features | Home Assistant Developer Docs
2024-02-26 18:18:16.420 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: zha
2024-02-26 18:18:46.316 ERROR (MainThread) [homeassistant.components.automation] Automation with alias ‘Toggle Dust Collector’ failed to setup actions and has been disabled: Unknown device ‘67f2b97c69768c045e33c71ca77cd7b3’
2024-02-26 18:18:46.501 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’) | float * 0.12 | round(2) }}) renders=2>
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 2006, in forgiving_float_filter
return float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: ‘unavailable’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 572, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 2332, in _render_with_context
return template.render(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/jinja2/environment.py”, line 1301, in render
self.environment.handle_exception()
File “/usr/local/lib/python3.12/site-packages/jinja2/environment.py”, line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File “”, line 1, in top-level template code
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 2009, in forgiving_float_filter
raise_no_default(“float”, value)
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 1637, in raise_no_default
raise ValueError(
ValueError: Template error: float got invalid input ‘unavailable’ when rendering template ‘{{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’) | float * 0.12 | round(2) }}’ but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 698, in async_render_to_info
render_info._result = self.async_render(
^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 574, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input ‘unavailable’ when rendering template ‘{{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’) | float * 0.12 | round(2) }}’ but no default was specified
2024-02-26 18:18:46.520 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError(‘ValueError: Template error: float got invalid input ‘unavailable’ when rendering template ‘{{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’) | float * 0.12 | round(2) }}’ but no default was specified’) while processing template ‘Template<template=({{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’) | float * 0.12 | round(2) }}) renders=4>’ for attribute ‘_attr_native_value’ in entity ‘sensor.energycosttemplate’
2024-02-26 18:18:46.523 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template<template=({{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’)|float * 0.5 }}") renders=2>
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 2006, in forgiving_float_filter
return float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: ‘unavailable’

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 572, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 2332, in _render_with_context
return template.render(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/jinja2/environment.py”, line 1301, in render
self.environment.handle_exception()
File “/usr/local/lib/python3.12/site-packages/jinja2/environment.py”, line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File “”, line 1, in top-level template code
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 2009, in forgiving_float_filter
raise_no_default(“float”, value)
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 1637, in raise_no_default
raise ValueError(
ValueError: Template error: float got invalid input ‘unavailable’ when rendering template ‘{{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’)|float * 0.5 }}"’ but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 698, in async_render_to_info
render_info._result = self.async_render(
^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/template.py”, line 574, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input ‘unavailable’ when rendering template ‘{{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’)|float * 0.5 }}"’ but no default was specified
2024-02-26 18:18:46.537 ERROR (MainThread) [homeassistant.components.template.template_entity] TemplateError(‘ValueError: Template error: float got invalid input ‘unavailable’ when rendering template ‘{{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’)|float * 0.5 }}"’ but no default was specified’) while processing template ‘Template<template=({{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’)|float * 0.5 }}") renders=4>’ for attribute ‘_attr_native_value’ in entity ‘sensor.tinyheatcost’
2024-02-26 18:18:55.136 ERROR (MainThread) [homeassistant.helpers.event] Error while dispatching event for sensor.tiny_heat_zwave_electric_consumption_kwh to <Job track state_changed event {‘sensor.tiny_heat_zwave_electric_consumption_kwh’} HassJobType.Callback <bound method TrackTemplateResultInfo._refresh of <TrackTemplateResultInfo {Template<template=({{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’)|float * 0.5 }}“) renders=6>: <RenderInfo Template<template=({{ states(‘sensor.tiny_heat_zwave_electric_consumption_kwh’)|float * 0.5 }}”) renders=6> all_states=False all_states_lifecycle=False domains=frozenset() domains_lifecycle=frozenset() entities=frozenset({‘sensor.tiny_heat_zwave_electric_consumption_kwh’}) rate_limit=None has_time=False exception=None is_static=False>}>>>
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 669, in state
numerical_value = float(value) # type:ignore[arg-type]
^^^^^^^^^^^^
ValueError: could not convert string to float: ‘448.254"’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/event.py”, line 296, in _async_dispatch_entity_id_event
hass.async_run_hass_job(job, event)
File “/usr/src/homeassistant/homeassistant/core.py”, line 700, in async_run_hass_job
hassjob.target(*args)
File “/usr/src/homeassistant/homeassistant/helpers/event.py”, line 1215, in _refresh
self.hass.async_run_hass_job(self._job, event, updates)
File “/usr/src/homeassistant/homeassistant/core.py”, line 700, in async_run_hass_job
hassjob.target(*args)
File “/usr/src/homeassistant/homeassistant/components/template/template_entity.py”, line 434, in _handle_results
self.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 989, in async_write_ha_state
self._async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 1110, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 1047, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 995, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/sensor/init.py”, line 671, in state
raise ValueError(
ValueError: Sensor sensor.tinyheatcost has device class ‘energy’, state class ‘total’ unit ‘kWh’ and suggested precision ‘None’ thus indicating it has a numeric value; however, it has the non-numeric value: ‘448.254"’ (<class ‘str’>)

I’m guessing something went wrong in one of these updates.

Could you check your Home Assistant config folder to see if you have a custom_components/hubitat directory and that it has files in it?

I’m also curious about those Hacs warnings, like

2024-02-26 18:17:23.761 WARNING (MainThread) [homeassistant.helpers.entity] Entity None (<class ‘custom_components.hacs.update.HacsRepositoryUpdateEntity’>) is using deprecated supported features values which will be removed in HA Core 2025.1

It’s a warning, so it’s not necessarily a problem, but I’m not seeing those warnings with my local install, which makes me wonder if maybe your version of HACS is out of date, and it had issues upgrading the integration.

1 Like

You were on to something with what you spotted about Hacs. There was nothing calling for an update so I called for a reload and re-started HA. At that point it immediately showed your most recent 2 updates and loaded the latest version. Now everything seems to be working properly. Thanks for taking the time to help me out @jason0x43

Great! I’m glad things are back in working order. :tada:

1 Like

Howdy folks -

I’m trying to get this integration working with Hubitat to no avail.

In Hubitat, I’ve created the Maker API, allowed remote connections, Ignore SSL certificates, copied in the correct static IP (I can ping Hubitat from my Home Assistant’s shell) into Home Assistant the correct API instance ID, and the token. The integration just keeps spinning. After a while, it dies with an “Unexpected Error” and no further information. Both systems have static IPs and are on the same subnet. Looking at the logs, I see this:

Logger: custom_components.hubitat.config_flow
Source: custom_components/hubitat/config_flow.py:89
Integration: hubitat (documentation, issues)
First occurred: 3:14:01 PM (1 occurrences)
Last logged: 3:14:01 PM

Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1119, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1101, in create_connection
    sock = await self._connect_sock(
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1004, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 637, in sock_connect
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 677, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('[IP Redacted]', 80)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/config/custom_components/hubitat/hubitatmaker/hub.py", line 167, in check_config
    await self._check_api()
  File "/config/custom_components/hubitat/hubitatmaker/hub.py", line 307, in _check_api
    await self._api_request("devices")
  File "/config/custom_components/hubitat/hubitatmaker/hub.py", line 467, in _api_request
    raise e
  File "/config/custom_components/hubitat/hubitatmaker/hub.py", line 414, in _api_request
    async with aiohttp.request(
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1243, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 578, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 544, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 911, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1235, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1204, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1000, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host [HOSTNAME Redacted]:80 ssl:default [Connect call failed ('[IP REDACTED]', 80)]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/hubitat/config_flow.py", line 89, in async_step_user
    info = await _validate_input(user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/hubitat/config_flow.py", line 463, in _validate_input
    await hub.check_config()
  File "/config/custom_components/hubitat/hubitatmaker/hub.py", line 169, in check_config
    raise ConnectionError(str(e))
ConnectionError: Cannot connect to host [HOSTNAME Redacted]:80 ssl:default [Connect call failed ('[IP Redacted]', 80)]

I’m running Core 2024.2.5, Supervisor 2024.02.1 and OS Version 12.0.

Hoping it’s something stupid. Any help is appreciated!

Cheers,
Bear

Sometime after 2/25 I stopped getting power reports from one of my outlets. I see the values in the Hubitat logs but its not in Home Assistant. Anyone else seeing this?

It was suggested i post on this thread, since im having issues with the Hubitat integration. any help would be much appreciated!

TLDR: 3 (of 11) inovelli zwave devices paired with hubitat arent sending state changes to HA, or responding to commands from HA but work fine when controlled from Hubitat.

Im having a weird issue i cant get to the bottom of. long post incoming.

All of my zwave devices are paired with my hubitat C7 hub. Hubitat is integrated via the Maker API to home assistant. HA is then the brains of my smart home.

Zigbee motion sensors manage most of my lighting automations, which are paired to HA via z2m or zha.

All worked well for a LONG time. Then all of the sudden, 3 or 4 days ago, i had three switches (so far that ive identified) that arent working right. They are all the same model switch, Inovelli LZW30. I have 8 others of the same model paired with HE that still work fine.

I can still control everything in hubitat. Lights turn on and off just fine when using the hubitat web interface. When i make changes there, though, it does not update in home assistant. This means that when my lights are turned off (manually or via hubitat), HA doesnt see the change so my lights wont turn on with motion if HA thinks they are on, and wont turn off if HA thinks they are off.

I can go into the device in HA and turn it off and the light turns off, but it doesnt show the state change in HA. then i can turn it back on, but still no entries of changes in HA (kitchen light was on for over 12 hours according to HA, which was not accurate).

It MIGHT have started after i updated HA Core but i cant remember, it seems like that was a day or two before the problems started. Looking at the logs, it must have started Fed 27th, maybe in the morning, the next state change was probably when i turned the switch on then rebooted HA, so it got the correct state from HE but wouldnt update again until another reboot or reload of the integration. My last Core Backup was on the 28th, then 2 weeks before that

Heres what ive tried:

updated Hubitat twice. Updated the associated apps in HE.

Removed the devices from the integration on the Hubitat side, reloaded the integration in HA but nothing changed other than devices going unavailable. Restarted HA, still no change.

Authorized the devices in HE again so HE can see then, reloaded the integration in HA, restarted HA just in case, but still no change. Then i restored my HA Core backup from a couple of days ago, rebooted everything, but still no change.

Im not sure if its bad hardware, but it would be weird if 3 switches started to fail within hours of each other, so i think its gotta be related to the integration. I havent removed and re-added the integration yet in HA, but i guess thats in the works for tomorrow if i cant get it worked out.

Anything else i can try? Anyone expereincing anything like this, or has seen this before?

Home Assistant:

Core 2024.2.2 (was on 2024.2.5 before Core restore)

Supervisor 2024.02.1

Operating System 12.0

Frontend 20240207.1

Hubitat:

Platform version 2.3.8.122

@elnorte On the hubitat side, you can see the data that these devices are putting out via the maker API. If you open the maker API app in hubitat, it will give you direction on how to see the data for each device via URL. You should be able to visit the URL for a given device, change the state of the device (off/on etc) and then refresh the URL and see the change. That will verify your data is getting out of hubitat via maker API correctly. If it is, then something with the home assistant integration is happening. If it isn’t, then the home assistant integration can’t do anything with data it doesn’t get. That’s pretty simple to verify, so I would start there.

1 Like

Thanks! When i test using the URL from the maker API, from what i can tell its sending the command. I get the following output, which is the same other than the device specific ID, for devices that are working in HA and devices that are not working in HA. So that leads me to believe HE is sending the command…i think?

{“id”:“647”,“name”:“Inovelli Switch LZW30”,“label”:“Kitchen can lights”,“type”:“Inovelli Switch LZW30”,“room”:“HA Integration”,“attributes”:[{“name”:“lastActivity”,“currentValue”:“2024 Mar 01 Fri 4:11:27 PM”,“dataType”:“STRING”},{“name”:“switch”,“currentValue”:“on”,“dataType”:“ENUM”,“values”:[“on”,“off”]},{“name”:“firmware”,“currentValue”:“1.11”,“dataType”:“STRING”},{“name”:“groups”,“currentValue”:2,“dataType”:“NUMBER”},{“name”:“lastEvent”,“currentValue”:null,“dataType”:“STRING”}],“capabilities”:[“Configuration”,“Actuator”,“Refresh”,“Switch”,{“attributes”:[{“name”:“switch”,“dataType”:null}]},“Sensor”],“commands”:[“childOff”,“childOn”,“childRefresh”,“componentOff”,“componentOn”,“componentRefresh”,“componentSetColor”,“componentSetColorTemperature”,“componentSetLevel”,“configure”,“off”,“on”,“refresh”,“setAssociationGroup”,“setConfigParameter”]}

Pay attention to this part:

{“name”:“switch”,“currentValue”:“on”,“dataType”:“ENUM”,“values”:[“on”,“off”]}

You should be able to turn that switch off, refresh the URL, and see currentValue change to on or off, etc. That will verify that makerAPI is sending state changes to home assistant. If you turn the switch off, and “currentValue” is still “on”, then that would mean home assistant is never receiving a state change. If you can verify that “currentValue” is changing as expected, then you can rule out the hubitat/makerAPI side.

when i change the state on the device page, it updates the URL and the output when i refresh it in another tab/window. when i change the URL and hit enter, it updates the state in the output as well as the state on the device page. the switch turns on and off as it should based on my commands.

still nothing updates in HA, though.

what makes it even more weird is if HA thinks the light is off, i can turn it on through HA, but the device state stays off, so i cant turn it off (same for the reverse), it doesnt matter if i reload the page. the only way to get HA to see the current state is to reload the integration, but then its stil stuck in whatever state it sees when the integration loads.

Okay, at least you can rule out hubitat/Maker API from that direction. With these 3 problem devices, is there anything different with how you have them named, compared to your other devices that are working? Have you renamed anything in home assistant that could be conflicting somehow with entity / device names for these 3 problem devices? Do you see anything in the home assistant logs related to the hubitat integration? If home assistant is trying to change the state of an entity and it can’t, that should be logged, and that would be helpful.

No changes to any entity or device names. Naming convention is all the same. Nothing in the logs for the one i looked at other than it going unavailable when i reload or restart then it updates to the current state.

You need to be looking in home assistant logs, not the logbook for devices.

Settings → system → logs. Search for hubitat

1 Like

It says unable to find entity. I can open the device details and actually toggle it, but the state never uodates in HA which i guess is why there were no entries in the logbook.

When i toggle it in HA, even though the state never changes it sends the command and turns it on or off in hubitat and i get a log entry there.

That indicates there’s a problem with the entity in Home Assistant. Have you renamed anything on the home assistant side? Or removed/deleted devices or entities? Did you change the device type in home assistant like switch to dimmer or light or anything like that? In home assistant, go to settings → devices & services → entities. Can you find switch.dining_table_light_switch in the entities list?

One of the quickest ways to see what’s going on is to enable debug logging and then interact with the problematic device and see what happens. If you toggle a switch and don’t see a message in the log, then Hubitat isn’t sending state updates. If you see a message and/or an error, then the integration may be having problems processing the state update for some reason. If you see state update messages and no errors, then as @sdholden28 suggests, double check that the entity ID you’re trying to use is the proper ID of the entity.

What version of the integration do you have installed?

1 Like

Here is the debug log after turning the switch on and off through HA.

‘2024-03-01 20:42:50.098 ERROR (MainThread) [custom_components.tapo_control] [initOnvifEvents] Initiating onvif connection failed.
2024-03-01 20:42:50.098 ERROR (MainThread) [custom_components.tapo_control] Authority failure
2024-03-01 20:42:51.110 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.covered_deck_tapo_camera_sd_stream] Error from stream worker: Error opening stream (HTTP_UNAUTHORIZED, Server returned 401 Unauthorized (authorization failed)) rtsp://:@10.0.5.192:554/stream2
2024-03-01 20:42:51.407 DEBUG (MainThread) [custom_components.hubitat.switch] Turning off Kitchen can lights
2024-03-01 20:42:51.407 DEBUG (MainThread) [custom_components.hubitat.hubitatmaker.hub] Sending command off(None) to 647
2024-03-01 20:42:51.474 DEBUG (MainThread) [custom_components.hubitat.device] sent off to 647
2024-03-01 20:42:51.663 DEBUG (MainThread) [custom_components.hubitat.hubitatmaker.hub] Received event: {‘name’: ‘lastActivity’, ‘value’: ‘2024 Mar 01 Fri 8:42:51 PM’, ‘displayName’: ‘Kitchen can lights’, ‘deviceId’: ‘647’, ‘descriptionText’: None, ‘unit’: None, ‘type’: None, ‘data’: None}
2024-03-01 20:42:51.663 DEBUG (MainThread) [custom_components.hubitat.hubitatmaker.hub] Updating lastActivity of 647 to 2024 Mar 01 Fri 8:42:51 PM (None)
2024-03-01 20:42:51.663 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback Hub._process_event({‘content’: {‘data’: None, ‘descriptionText’: None, ‘deviceId’: ‘647’, ‘displayName’: ‘Kitchen can lights’, …}})
Traceback (most recent call last):
File “/usr/local/lib/python3.12/asyncio/events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
File “/config/custom_components/hubitat/hubitatmaker/hub.py”, line 328, in _process_event
listener(evt)
File “/config/custom_components/hubitat/hub.py”, line 484, in handle_event
listener(event)
File “/config/custom_components/hubitat/device.py”, line 142, in handle_event
self.async_schedule_update_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 1224, in async_schedule_update_ha_state
self.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 966, in async_write_ha_state
raise RuntimeError(f"Attribute hass is None for {self}“)
RuntimeError: Attribute hass is None for
2024-03-01 20:42:51.667 DEBUG (MainThread) [custom_components.hubitat.hubitatmaker.hub] Received event: {‘name’: ‘switch’, ‘value’: ‘off’, ‘displayName’: ‘Kitchen can lights’, ‘deviceId’: ‘647’, ‘descriptionText’: None, ‘unit’: None, ‘type’: ‘physical’, ‘data’: None}
2024-03-01 20:42:51.667 DEBUG (MainThread) [custom_components.hubitat.hubitatmaker.hub] Updating switch of 647 to off (None)
2024-03-01 20:42:51.667 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback Hub._process_event({‘content’: {‘data’: None, ‘descriptionText’: None, ‘deviceId’: ‘647’, ‘displayName’: ‘Kitchen can lights’, …}})
Traceback (most recent call last):
File “/usr/local/lib/python3.12/asyncio/events.py”, line 84, in _run
self._context.run(self._callback, *self._args)
File “/config/custom_components/hubitat/hubitatmaker/hub.py”, line 328, in _process_event
listener(evt)
File “/config/custom_components/hubitat/hub.py”, line 484, in handle_event
listener(event)
File “/config/custom_components/hubitat/device.py”, line 142, in handle_event
self.async_schedule_update_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 1224, in async_schedule_update_ha_state
self.async_write_ha_state()
File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 966, in async_write_ha_state
raise RuntimeError(f"Attribute hass is None for {self}”)
RuntimeError: Attribute hass is None for ’

hopefully that means something to you haha, this is getting over my head pretty quick