Hive Integration

Any updates on this one? Looked through the release notes for 0.67 but couldn’t see anything.

Hi @roostlick

No it’s not released yet. There is a HA reviewer reviewing it now. Hopefully the next release.

1 Like

Quick update HA reviewer has reviewed changes and has accepted them. They have been merged into the HA code. The changes will most likely be in HA 0.68 which is the next major version i think.

1 Like

Not sure if anyone has read about HA new release schedule and the new beta period they have before releasing to everyone?

If you havnt below is a link to there blog explaining it.

Hi all,

Home assistant version 0.68 has been released this weekend. This realease includes the next round of changes including the motion sensor fix along with other changes a link to the PR detailing them is in the link below. With this update we have also updated the custom component which gives you extra sensors, the updated custom component can also be found below.

PR detailing changes

Custom Component

Sorry so do we need to do anything with this? It’s not very clear.

I have upgraded to 68.1 and now am seeing Hive errors in the log.

Thanks

hi @gr4z

if you are not using the sensor custom component then you only need to do the usual home assistant upgrade
if you are using the sensor custom component then you need to download the latest file version from the GitHub link that @Khole posted above and save that to your custom component sensor folder overwriting the old version

sorry that GitHub link is for latest PR.

Here is the link to the latest version of the custom component file:
https://github.com/Rendili/hive-for-home-assistant/tree/master/custom_components/sensor

Great thanks everyone. Can we be clear whats in the custom_component rather than the normal component in HA?

see below, the first is the default object. the custom_component adds the various sensors below to a) enable easier automation checks and b) add an easy way for “heating state”
image

Hi Delphi

I’ve put a copy of the file hive.py in the /config/custom_component directory that I’ve created. i.e.

core-ssh:/config/custom_component# ls -lart
total 176
-rwxr–r-- 1 root root 168332 May 19 17:07 hive.py
drwxr-xr-x 2 root root 4096 May 19 17:08 .
drwxr-xr-x 8 root root 4096 May 19 17:20 …

Then I restarted Hassio, but don’t see the extra items. I only see the first two default items.

Is there something that I’m missing?

Thanks

Will.

Actually I noticed that I created a directory called custom_component which is wrong. Changed it to custom_components and my hive heating component has gone completely.

I’m going to delete the py file and reboot to get it back.

But just wondering what I should do to set this up?

Thanks

Will.

If HA doesn’t run as root, it may not be able to write out the cache file…

Hi Delphi

I’m running hassio, so doesn’t it run as a set user (probably root) anyway?

Can I confirm the steps:

  1. copy the hive.py file into the custom_components directory.
  2. Leave this bit in the configuration.yaml:

hive:
username: [email protected]
password: example-password

  1. restart hassio.

Is there anything that I need to do? Do I need to setup sensors etc in the groups file?

Thanks

Will

Hi @willsy555

I don’t have an hassio setup I have HA running on the server but for the custom component to work the hive.py file needs to be in a ‘sensor’ folder within the custom components folder. below is an example of mine.

<home directory>/.homeassistant/custom_components/sensor/hive.py

Hope this helps

1 Like

Hi @Khole

I will give that a try… Much appreciated! :slight_smile:

Thanks

WIll.

@Khole thanks. I missed that.

As fast as hasio, I don’t use it, but I would expect has runs as a homeassistant user. I did find permission problems on my set up which caused the same…

Hi,

Thanks for your help.

In the end, noticed that the file I was downloading (with right click and save as) was different to the file I got when opening it in Github.

So I copied the file contents in Github and pasted it into Notepad++.

Then changed EOL to Unix and saved in the /config/custom_components/sensor directory on hassio.

Then restarted and noticed that I had new sensors added.

As I added these as a group item before, I added them to my groups file as per below:

hive_heating:
name: Hive Heating
entities:
- climate.heating
- climate.hot_water
- sensor.heating_mode
- sensor.heating_boost
- sensor.heating_state
- sensor.target_temperature
- sensor.current_temperature
- sensor.thermostat_battery_level
- sensor.thermostat_status

Then added this into my home tab as per below. nb I’ve snipped out all my other bits from this:

default_view:
name: Home
view: yes
entities:
- group.hive_heating

Plus I have the standard username and password entry in the configuration.yaml.

Just thought I would set this out in case it helps anyone else…

All working perfectly now!

Thanks very much @Khole & @230delphi & @rendili for your help with my issue and for your work on this add-on. It’s awesome! :slight_smile:

Thanks

Will.

1 Like

Seems like there’s still no news. It’s been over 2 years. :-/

Been getting a lot of this recently, anyone else?

2018-06-18 10:13:10 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 235, in async_update_ha_state
    icon = self.icon
  File "/config/custom_components/sensor/hive.py", line 380, in icon
    return icon_for_battery_level(battery_level=self.batt_lvl)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/icon.py", line 16, in icon_for_battery_level
    elif battery_level <= 5:
TypeError: '<=' not supported between instances of 'str' and 'int'
2018-06-18 10:13:16 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 235, in async_update_ha_state
    icon = self.icon
  File "/config/custom_components/sensor/hive.py", line 380, in icon
    return icon_for_battery_level(battery_level=self.batt_lvl)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/icon.py", line 16, in icon_for_battery_level
    elif battery_level <= 5:
TypeError: '<=' not supported between instances of 'str' and 'int'