No we don’t have that functionality yet. Please raise an enchantment in the GitHub repo. And I can investigate.
Hi @David_Letts
It looks like the way your are installing it is the async version. If you install it via pip it will convert it to sync for you to use and you shouldn’t get this issue.
Oh wow thanks, I’ll raise it shortly. Sorry for creating more work for you!
Ah yes that was it thanks I have it working now. I didn’t realise you have to build it as a package first and then reference that - I was trying to use the example code and directly reference the code downloaded from github. That was my 2 hours of python experience showing there! Thanks again for the help!
Hi, I’m having issues with this, I’ve tried removing integration, re-installed from HACS etc but no joy, any suggestions? I’m able to complete login (with 2FA or with it off, same either way):
Logger: homeassistant.config_entries
Source: custom_components/hive/init.py:134
First occurred: 19:06:08 (2 occurrences)
Last logged: 19:15:00
Error setting up entry [email protected] for hive
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 248, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/config/custom_components/hive/init.py”, line 134, in async_setup_entry
devices = await hive.session.startSession(hive_config)
File “/usr/local/lib/python3.8/site-packages/pyhiveapi/session.py”, line 345, in startSession
await self.add_list(“light”, p)
File “/usr/local/lib/python3.8/site-packages/pyhiveapi/session.py”, line 45, in add_list
device = self.helper.getDeviceData(data)
File “/usr/local/lib/python3.8/site-packages/pyhiveapi/helper/hive_helper.py”, line 65, in getDeviceData
elif type == “warmwhitelight” and product[“props”][“model”] == “SIREN001”:
KeyError: ‘model’
It looks like you have a device without a model can you give us a list of your hive devices and then we can see if anything unusual stands out.
Hi, please see attached if this helps? Btw this has all been working fine, just last few days this has happened.
Hi all,
2022.3.0 has been released see release notes below.
This release is the custom version of the code that will be released officially in the April release. Unfortunately it is another breaking change and will require to remove the home assistant integration and set it backup via the UI. There shouldn’t be any more breaking changes after this release.
Thanks.
I went on my HA app today and noticed the Hive heating was showing N/A on all entities so looked to see if any updates and noticed this latest one but i’m still getting N/A.
Have you heard any reports of the component being broken ?
On the list of entities the error on the right is saying restored what ever that means.
Any ideas
Thanks
No I just noticed the update within hacs so updated it.
I’ll do that.
Thanks
same here… it was working until a couple of days ago. Just uninstall it and install it back… It works now…
Yeah sorry I forgot to come back and say.
I reinstalled it yesterday and it’s working great again.
Thanks @Khole
Hi
I seem to be having the same issue with 2021.3.1 as shown below.
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 248, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File “/config/custom_components/hive/init.py”, line 76, in async_setup_entry
devices = await hive.session.startSession(hive_config)
File “/usr/local/lib/python3.8/site-packages/apyhiveapi/session.py”, line 271, in startSession
return await self.createDevices()
File “/usr/local/lib/python3.8/site-packages/apyhiveapi/session.py”, line 289, in createDevices
eval(“self.” + code)
File “”, line 1, in
File “/usr/local/lib/python3.8/site-packages/apyhiveapi/session.py”, line 84, in addList
device = self.helper.getDeviceData(data)
File “/usr/local/lib/python3.8/site-packages/apyhiveapi/helper/hive_helper.py”, line 69, in getDeviceData
elif type == “warmwhitelight” and product[“props”][“model”] == “SIREN001”:
KeyError: ‘model’
Trying to find a version that I can get to install. Then I can share the devices that I have.
Kevin
Sadly I can’t get this working now in any version of the integration, even going back to 2021.2 which I had working previously. Have tried manual installs etc. All complaining about the ‘model’ for the warmwhitelight. Very strange.
The devices i have are
Hive Heating (single zone)
A bunch of Hive TVRs
Warm White Lights (both normal bulbs and GU10)
Some “tunable” GU10 bulbs - the ones that can be set from warm to cold white
A Colour Light (standard bulb)
Kevin
Do you use hive groups with Hive?
Hi @Khole no not any more I removed them! Interestingly, I have managed to get this working and it now works on the latest version. I removed an unused light (called spare). It had been there for the whole time I have used HA and I’ve installed this integration numerous times. It feels like that has caused Hive to return the list of devices differently. Is there any chance that it is based on what device is returned first or something like that? Maybe it would help to have some debug based code that can be executed somewhere and get a dump of the responses that the integration is getting back, then we could be sure.
Thanks for replying. Panic over (for now). Happy to raise a bug in Github with what I know if it helps.
Kevin
@keviny so there is an issue with old lingering devices. Yes if you could raise a bug with all the info you have would be much appreciated.
I’m pleased to see that people are getting their Hive integrations up and working again, unfortunately I am not. Therefore it is probably something simple and stupid I am doing.
I have Hive heating with hot water and a single bulb all showing as “Unavailable”. I have 2020.3.1 of the custom component installed (via HACS. Uninstalled previous version - restart HA - install latest - restart HA).
Hive Integration shows 3 devices (the Hub, the thermostat and the bulb) with 16 entities. All the entities have a ! in a red anti-clockwise arrowed circle which says “Restored” when hovered over.
In the Log I have “Error setting up entry [email protected] for hive”
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/apyhiveapi/api/hive_async_api.py", line 61, in request
{"authorization": self.session.tokens.tokenData["token"]}
KeyError: 'token'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 248, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/config/custom_components/hive/__init__.py", line 76, in async_setup_entry
devices = await hive.session.startSession(hive_config)
File "/usr/local/lib/python3.8/site-packages/apyhiveapi/session.py", line 264, in startSession
await self.getDevices("No_ID")
File "/usr/local/lib/python3.8/site-packages/apyhiveapi/session.py", line 201, in getDevices
await self.hiveRefreshTokens()
File "/usr/local/lib/python3.8/site-packages/apyhiveapi/session.py", line 173, in hiveRefreshTokens
updated = await self.api.refreshTokens()
File "/usr/local/lib/python3.8/site-packages/apyhiveapi/api/hive_async_api.py", line 126, in refreshTokens
await self.request("post", url, data=jsc)
File "/usr/local/lib/python3.8/site-packages/apyhiveapi/api/hive_async_api.py", line 68, in request
raise NoApiToken
apyhiveapi.helper.hive_exceptions.NoApiToken
I had not been using 2FA, but turned it on to see if that made a difference, and it didn’t, presumably because the error tripped out before it got that far.
What have I missed??
I’m assuming you have updated to the latest version of the custom component? This is a breaking change and requires to remove the integration and set it back up.