Migrated to C8 - Maker API to Home Assistant - Sensor issues

Hello everyone,

I am writing this to see if any of you encountered any issues with HA not being able to read any sensors after migration to C-8.

I believe API maker needs to be updated as there are some changes in the HA Core 2023.1 with some enums.

See this link:

All HE devices are imported to HA but the sensors do not get any values updated and HA come with this error:

Logger: homeassistant.setup
Source: setup.py:320
First occurred: 16 April 2023 at 18:46:04 (1 occurrences)
Last logged: 16 April 2023 at 18:46:04

Unable to prepare setup for platform hubitat.sensor: Platform not found (cannot import name 'UnitOfElectricCurrent' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)).

Any help is appreciated.

Actually it seems not to be related to Home Assistant and is Maker API related as another integration (HomeHabit) also does not receive sensor updates.

Has anyone seen this ?

Is this in reference to the Home Assistant Device Bridge or the Hubitat integration normally installed via HACS?

The HACS Hubitat integration was recently updated and a couple of my devices were affected by that.

This pertains to Hubitat integration installed via HACS. It seems the UnitOfElectricCurrent enumeration is depreciated in Core 2023.1 and it affect some sensors, for me, contacts, humidity and temperatures, their values simply doesn't get updates as the HA can not setup the hubitat.sensor properly.

As a work around, I am trying to find a way to add the followings to HA Const.py file, but I run HA in a docker and am not familiar with Bash and how to access that file.

Electric_potential units

class UnitOfElectricPotential(StrEnum):
"""Electric potential units."""

MILLIVOLT = "mV"
VOLT = "V"

Thanks

Why not ask fellow users or the developer in the topic he created for the integration in the Home Assistant forum? If you are correct, you would not be alone, and it could probably be fixed (or users there may have other ideas if it's something else): Custom Component: Hubitat - Custom Integrations - Home Assistant Community

1 Like

I was just wondering no one seen this yet.
I am trying to find the culprit. I am now inspecting & editing the const.py file to see if this fixes the issue. I will then post the result to the developer.
Thanks

Just an update, I added the enum to the const.py and I am getting a different error. seems this is more than the enum

Error unloading entry Hubitat (3b63d9f4) for sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 498, in async_unload
result = await component.async_unload_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 426, in async_unload_entry
return await component.async_unload_entry(entry)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 176, in async_unload_entry
raise ValueError("Config entry was never loaded!")
ValueError: Config entry was never loaded!

UnitOfElectricCurrent enum replaced the previous constants, so should already be in place.

I'm running the current version of HA in a container and using a C8 with several Maker API instances.

My temperature sensors are working fine, being shared from Hubitat to HA.

What type of sensors do you have?

Is your C8 using the same IP address as your previous Hubitat device?

Thanks for the reply, at least I know it is not a general issue and probably only related to my installation. My sensors are mostly Zooz but some Zigbee Tuya temp & humidity.

Hello, I just realized that my HA does not notify and pull updates, so I am on the HA 0222.11.2 and it seems the latest stable version is 2023.4.4. I checked updates are not turned off or skipped, seems others have this issue. This could be the reason for those sensor issues. I also realized that some Temp sensors are being identified as Motion sensors in HA.

I never updated HA manually, I was wondering how to do that, I am thinking to take a backup first and then create a container with latest HA and just restore the backup. Would this work or you are able to suggest a better way ?

Thank you in advance.

Depending on how you have your container setup configured will determine how difficult or easy it is to update your HA install.

My container setup does not auto-update, but I do have the Docker Hub integration installed, which has sensors to indicate the current container version, and whether an update is available.
I have that displayed on my status dashboard.

In my case, I use Portainer for the management of my containers.

I have my HA container configured so that all of my configuration information is stored in a volume outside of the container.
In my case, updating HA is simply a matter of going into Portainer, selecting the Home Assistant container, clicking the "Recreate" button and select the re-pull image option.

Thank you. I reinstalled the container and maintained the config folder, it seems working.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.