home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.61k stars 30.37k forks source link

automation error #120426

Closed hannes3510 closed 3 months ago

hannes3510 commented 3 months ago

The problem

Error with automation to start and stop the airconditioning unit

What version of Home Assistant Core has the issue?

core-2024.6.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Automation

Link to integration documentation on our website

No response

Diagnostics information

Logger: homeassistant.components.automation.airco_kinderkamer_2 Source: components/automation/init.py:723 integration: Automation (documentation, issues) First occurred: 16:08:13 (2 occurrences) Last logged: 16:08:36

While executing automation automation.airco_kinderkamer_2 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/automation/init.py", line 723, in async_trigger return await self.action_script.async_run( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1769, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1073, in _async_if_step await self._async_run_script(if_data["if_else"]) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1239, in _async_run_script result = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1769, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 464, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 528, in _async_step self._handle_exception( File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 558, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 763, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 726, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2741, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2784, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1002, in entity_service_call raise result from None File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1601, in async_request_call return await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1049, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 844, in async_turn_off raise NotImplementedError NotImplementedError

Example YAML snippet

alias: Airco kinderkamer 2
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.airco_kinderkamer_2_2
condition: []
action:
  - service: climate.set_temperature
    metadata: {}
    data:
      temperature: "{{ states.sensor.temp_k2.state }}"
    target:
      area_id: kinder_kamer_2
  - if:
      - condition: numeric_state
        entity_id: sensor.airco_kinderkamer_2_2
        above: 0
    then:
      - service: climate.turn_on
        metadata: {}
        data: {}
        target:
          area_id: kinder_kamer_2
          device_id: 7e559aa8b6e28c94074281290d810eab
    else:
      - service: climate.turn_off
        metadata: {}
        data: {}
        target:
          area_id: kinder_kamer_2
          device_id: 7e559aa8b6e28c94074281290d810eab
mode: restart

Anything in the logs that might be useful for us?

No response

Additional information

No response

mib1185 commented 3 months ago

which integration provides the climate entity?

hannes3510 commented 3 months ago

https://github.com/jwillemsen/daikin_onecta

from @jwillemsen

jwillemsen commented 3 months ago

The daikin_onecta climate does have a turn_off implemented, see https://github.com/jwillemsen/daikin_onecta/blob/7d751e9bea51381ccbaf69e8fe94323cbf4b24f6/custom_components/daikin_onecta/climate.py#L794

mib1185 commented 3 months ago

Hi https://github.com/jwillemsen/daikin_onecta is a custom component, which is not maintained by the HA core project. Please report your issue to the maintainer or in the source repository of this custom component. Maybe you need to update this custom component? Thx 👍

jwillemsen commented 3 months ago

Turn on/off is tested as part of the unit tests, see https://github.com/jwillemsen/daikin_onecta/blob/7d751e9bea51381ccbaf69e8fe94323cbf4b24f6/tests/test_init.py#L512

hannes3510 commented 3 months ago

Ow, ... now i feel stupid , why can i select that block then?

jwillemsen commented 3 months ago

Are you 100% sure the device_id you listed is correct?

hannes3510 commented 3 months ago

can be closed, i resolved the error with a different climate block

jwillemsen commented 3 months ago

Maybe you can share the updated climate block, maybe it helps someone else in the future