MTrab/landroid_cloud

Error "unsupported operand type(s) for -: 'str' and 'int'" on zone selection

fanningert opened this issue · 0 comments

Describe the issue

When I use the new input select for zone selection. I get the error "unsupported operand type(s) for -: 'str' and 'int'". The zone are configured (checked on Worx mobil app).

What version of Home Assistant Core has the issue?

core-2024.4.3

What was the last working version of Home Assistant Core?

core-2024.4.3

What version of the Landroid Cloud integration do you have installed

v5.0.0

What type of installation are you running?

Home Assistant OS

Which make and model is the mower used for this integration?

Worx Landroid M500 (WR141E)

Diagnostics information (NOT log entries!)

None

Relevant log entries

[140200483139904] unsupported operand type(s) for -: 'str' and 'int'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 195, in async_handle_select_option
    await self.async_select_option(option)
  File "/config/custom_components/landroid_cloud/device_base.py", line 890, in async_select_option
    self.entity_description.command_fn(self._api, str(option - 1))
                                                      ~~~~~~~^~~
TypeError: unsupported operand type(s) for -: 'str' and 'int'

Additional information

No response