Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resetting heating power via service throws error & doesn't work #939

Closed
arough007 opened this issue Feb 4, 2023 · 1 comment · Fixed by #1119 or #1184
Closed

Resetting heating power via service throws error & doesn't work #939

arough007 opened this issue Feb 4, 2023 · 1 comment · Fixed by #1119 or #1184
Assignees
Labels
bug Something isn't working

Comments

@arough007
Copy link
Contributor

Description

When trying to reset the heating power via the service there is an error thrown.

Steps to Reproduce

  1. Call Better Thermostat: reset_heating_power service via developer tools
  2. Poof!

Expected behavior:

The service should reset the heating power

Actual behavior:

It throws this error:

This error originated from a custom integration.

Logger: homeassistant.helpers.script.websocket_api_script
Source: custom_components/better_thermostat/climate.py:94
Integration: Better Thermostat (documentation, issues)
First occurred: 10:45:03 (1 occurrences)
Last logged: 10:45:03

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: object method can't be used in 'await' expression
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 787, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/config/custom_components/better_thermostat/climate.py", line 94, in async_service_handler
    await self.reset_heating_power
TypeError: object method can't be used in 'await' expression

Versions

BT 1.0.0
HA 2023.1.7

@arough007 arough007 added the new bug incoming bug issue label Feb 4, 2023
@KartoffelToby KartoffelToby added bug Something isn't working and removed new bug incoming bug issue labels May 3, 2023
@KartoffelToby KartoffelToby removed their assignment May 3, 2023
@trubeck
Copy link

trubeck commented Oct 27, 2023

I have encountered the same issue with BT version 1.3.0 and HA version 2023.10.5. Is there a workaround to reset the heating power without having to remove the integration for the related thermostat and setting it up all over again?

CoRfr added a commit to CoRfr/better_thermostat that referenced this issue Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants