Pyhass / Hive-Custom-Component

A custom version of the home assistant hive component
MIT License
33 stars 17 forks source link

[BUG] Hot water boost service does not work on 2021.5.1 #95

Closed ovid-io closed 3 years ago

ovid-io commented 3 years ago

Describe the bug Hot water boost service does not seem work on 2021.5.1 It fails with the following error in logs:

2021-05-07 09:53:48 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140131897415040] Error handling message: Unknown error,
AttributeError: 'WaterHeater' object has no attribute 'turnBoostOn',
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 21, in _handle_async_response,
    await func(hass, connection, msg),
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 482, in handle_execute_script,
    await script_obj.async_run(msg.get("variables"), context=context),
    await asyncio.shield(run.async_run()),
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1209, in async_run,
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 345, in async_run,
    await self._async_step(log_exceptions=False),
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 363, in _async_step,
    await getattr(self, handler)(),
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 563, in _async_call_service_step,
    await service_task,
  File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call,
    task.result(),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service,
    await handler.job.target(service_call),
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 630, in handle_service,
    await service.entity_service_call(,
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call,
    future.result()  # pop exception if have,
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 726, in async_request_call,
    await coro,
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call,
    await result,
  File "/usr/src/homeassistant/homeassistant/components/hive/__init__.py", line 106, in wrapper,
    await func(self, *args, **kwargs),
  File "/usr/src/homeassistant/homeassistant/components/hive/water_heater.py", line 142, in async_hot_water_boost,
    await self.hive.hotwater.turnBoostOn(self.device, time_period)

If using the operation selector on water_heater.hot_water enitity it does fire, so issue seems to be unrelated to hive API

Entity sensor.hotwater_boost also always stays in OFF, whereas sensor.hotwater_mode does report the correct state

To Reproduce Steps to reproduce the behaviour:

Issue the following service call:

service: hive.boost_hot_water
data:
  entity_id: water_heater.hot_water
  time_period: '00:15:00'
  on_off: 'on'
jasonwragg commented 3 years ago

I have this issue also on 2021.5.0

KJonline commented 3 years ago

Fixed in 2021.5.3