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
74.08k stars 31.09k forks source link

Bosch Smart Home - cover/stop_cover. name 'ShutterControlService' is not defined #108020

Closed DeepHyperspace closed 8 months ago

DeepHyperspace commented 10 months ago

The problem

I have several Shutters that i control with the Home Assistant Bosch Smart Home integration. Open or closing the blinds works just fine. But using a stop command leads to an error.

I get this error: Fehler beim Aufrufen des Diensts cover/stop_cover. name 'ShutterControlService' is not defined

Using Node-Red and the node-red-contrib-bosch-shc it works fine. I think the correct name is: ShutterControl not ShutterControlService. Maybe just a small typo in the python code :-)

File "/usr/local/lib/python3.11/site-packages/boschshcpy/models_impl.py", line 354, in stop "operationState", ShutterControlService.State.STOPPED.name

What version of Home Assistant Core has the issue?

core-2024.1.3

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

Bosch Smart Home

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bosch_shc

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:238
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 14:56:36 (1 occurrences)
Last logged: 14:56:36

[547437701056] name 'ShutterControlService' is not defined
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2149, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2186, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 882, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 952, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/cover/__init__.py", line 429, in async_stop_cover
    await self.hass.async_add_executor_job(ft.partial(self.stop_cover, **kwargs))
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/bosch_shc/cover.py", line 61, in stop_cover
    self._device.stop()
  File "/usr/local/lib/python3.11/site-packages/boschshcpy/models_impl.py", line 354, in stop
    "operationState", ShutterControlService.State.STOPPED.name
                      ^^^^^^^^^^^^^^^^^^^^^
NameError: name 'ShutterControlService' is not defined

Additional information

No response

home-assistant[bot] commented 10 months ago

Hey there @tschamm, mind taking a look at this issue as it has been labeled with an integration (bosch_shc) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `bosch_shc` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign bosch_shc` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


bosch_shc documentation bosch_shc source (message by IssueLinks)