Hive Heating UK

No problem, I dont have that issue, I can see and set all 3 modes, they all seem to work fine:
Imgur

Thanks James. I just realised it’s actually a problem with the iPad and iPhone Safari browser where it doesn’t allow you to scroll through the list, only showing the current mode. It works fine from a PC.

Nice one, glad its (mainly) working :slight_smile:

Just to warn you, the modes are a bit buggy, the way the Hive Web interface works is… odd… to say the least. The setting modes should work fine, but retrieving the mode is a different story altogether. Sometimes says the mode is manual for me when it’s actually on schedule. I commented out the mode from my code, I might have to have a look at it again and figure out how stuff works better. :-S
:cat2:

Ah yes, I dont use the shedule but I have just tested and that doesnt quite display properly. Thanks for all your work on this GreenTurtwig :slight_smile:

HI, I have had Hive for over a year now but just got into HA running on Ubuntu. I would love to integrate them together but the instructions above are above my head. Can anyone help with what I have to do? It’s not too clear with what I do with the python file linked above :frowning:

EDIT: I have managed to get the py code in place and think I have found my Thermostat ID, but I get the errors people are getting above:

16-12-15 19:57:20 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/home/ha/.local/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 335, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/home/ha/.local/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 204, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/home/ha/.local/lib/python3.5/site-packages/homeassistant/helpers/entity.py", line 224, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/home/ha/.local/lib/python3.5/site-packages/homeassistant/components/climate/__init__.py", line 379, in state_attributes
    self._convert_for_display(self.current_temperature),
  File "/home/ha/.local/lib/python3.5/site-packages/homeassistant/components/climate/__init__.py", line 568, in _convert_for_display
    value = convert_temperature(temp, self.temperature_unit,
  File "/home/ha/.local/lib/python3.5/site-packages/homeassistant/components/climate/__init__.py", line 435, in temperature_unit
    raise NotImplementedError
NotImplementedError

I have impleemnted the suggested fix but to no avail. Anyone else’s still working? Thanks

The error I had was identical to yours and was fixed by James. I assume you entered the below in your hiveheat.py file?

@property
def temperature_unit(self):
“”“Return the unit of measurement.”""
return TEMP_CELSIUS

Yup. I am using the ID for ‘Your Thermostat’.

After pulling my hair out I decided to reset my config and start again. Worked first time. So no idea what was wrong before but I have now have the Hive settings appearing. Just need to figure how to set temperatures when away from home!! :slight_smile: thanks.

My automation doesn’t seem to do anything. This is my code:

alias: 'Family away'
trigger:
  - platform: state
    entity_id: group.family
    from: 'home'
    to: 'not_home'
action:
  - service: climate.set_temperature
    data:
      entity_id: climate.hive_thermostat
      temperature: 17
      operation_mode: off

Anyone else got this to work?

EDIT: changed code to operation_mode: “off” and it worked :slight_smile:

Is this working reliably now? Is there any chance this can be added as an official integration?

Nope, unfortunately not. Until Hive releases a public API this workaround is all there is. When I asked them on Twitter they said “This is something we are looking into but not at the moment”… :crying_cat_face:

I got it to work with a bit of playing,main issue is getting your “Receiver” even though I only have 1 receiver 1 thermostat…theres are 4-5 different ID’s for the receiver,i just went though them 1 by one…

what issue you having ??

Lee

Mine has been working reliably since I last contributed to this thread. When we all leave home, the schedule turns off. When home it returns to schedule.

I dont have to rely on Hive bringing out any geolocation now. Done by HA instead.

What was your automation script in the end? whas was different to the above ?

Nope that’s it. So long as you have your set your config up as above all works fine.

Thanks, @GreenTurtwig! Works for me :slight_smile: Very pleased indeed. It was just a case of trial and error with the ID for “name”: “Receiver” (I have 4 such IDs)

Great! :heart: Glad it works.
The setup is still such a pain, hopefully this year Hive/British Gas will release a public API. :cat2:

Hello, it looks like 0.39.3 has broken my hive component. Has it stopped working for you too? I see the following error:

The following errors have been logged this session:

17-03-04 21:10:23 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 341, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 209, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    state = self.state
  File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/climate/__init__.py", line 398, in state
    if self.current_operation:
  File "/home/homeassistant/.homeassistant/custom_components/climate/hiveheat.py", line 109, in current_operation
    if self._thermostatParsed["activeScheduleLock"]["targetValue"] == False and self._thermostatParsed["activeHeatCoolMode"]["reportedValue"] == "HEAT":
KeyError: 'targetValue'` 

Thanks in advance for you help here.

In that case I will hold off 39.3! Thanks for the heads up.