krahabb / meross_lan

Home Assistant integration for Meross devices
MIT License
450 stars 47 forks source link

MTS960 smart thermostat reports heating while it's cooling #417

Closed pshirshov closed 6 months ago

pshirshov commented 7 months ago

Version of the custom_component

5.0.3

Describe the bug

I have an MTS960 which is set to cooling mode with set temp 25 degrees. The measured temperature is 18 degrees.

For some reason the component reports the stat as being in heating mode and when I try to change the set temperature I'm getting " list index out of range" messages.

When I try to switch to cooling from HA, I'm getting

Screenshot_20240401_221233

Debug log


2024-04-01 21:43:13.134 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215794821312] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:43:41.398 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215794821312] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:43:45.540 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215794821312] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:43:48.658 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215794821312] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:43:51.207 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215794821312] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:43:59.621 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215489745088] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:44:02.180 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215489745088] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:44:03.921 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215489745088] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:44:05.586 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215489745088] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 21:48:59.572 WARNING (MainThread) [custom_components.meross_cloud] Skip MQTT cert validation option set to: False
2024-04-01 21:48:59.623 WARNING (MainThread) [custom_components.meross_cloud] 
===============================
Meross Cloud Custom component
Developed by Alberto Geniola
Low level library version: 0.4.6.2
-------------------------------
This custom component is under development and not yet ready for production use.
In case of errors/misbehave, please report it here: 
https://github.com/albertogeniola/meross-homeassistant/issues

If you like this extension and you want to support it, please consider donating.
-------------------------------
List of devices reported by HTTP API:
- Attic Extraction (mts960) - OnlineStatus.ONLINE
===============================
2024-04-01 21:48:59.934 WARNING (MainThread) [meross_iot.manager] Found a new device Attic Extraction (mts960, HW 4.0.0, FW 4.2.6, class: mts960:4.0.0:4.2.6) that has become online while we were offline.
2024-04-01 21:53:01.185 ERROR (MainThread) [meross_iot.manager] An error occurred while attempting to send a message over internal LAN to device 2309040547341460080248e1e9d8b541. Retrying with MQTT transport.
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/meross_iot/manager.py", line 833, in async_execute_cmd
    return await self._async_execute_cmd_http(device_ip=device.lan_ip,destination_device_uuid=destination_device_uuid,method=method,namespace=namespace,payload=payload,timeout=min(timeout, 1.0))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/meross_iot/manager.py", line 866, in _async_execute_cmd_http
    async with session.post(f"http://{device_ip}/config", json=json.loads(message.decode()), timeout=timeout) as response:
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 504, in _request
    with timer:
  File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in __exit__
    raise asyncio.TimeoutError from None
TimeoutError
2024-04-01 22:02:49.487 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /addons/8b8632af_meross_local_broker/stats - Can't read stats from addon_8b8632af_meross_local_broker: Expecting value: line 1 column 1 (char 0)
2024-04-01 22:06:36.832 ERROR (Thread-18 (_thread_main)) [meross_iot.model.enums] Namespace Appliance.Control.Thermostat.ModeB is not currently handled/recognized.
2024-04-01 22:06:36.834 ERROR (Thread-18 (_thread_main)) [meross_iot.manager] Push notification parsing failed. That message won't be dispatched.
2024-04-01 22:09:05.461 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Polling begin
2024-04-01 22:09:05.463 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Multiple (messageId:c6ba2928a82244cb828c027cc37fe3a6)
2024-04-01 22:09:05.521 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Multiple (messageId:c6ba2928a82244cb828c027cc37fe3a6)
2024-04-01 22:09:05.521 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Appliance.Control.Multiple requests=3 (responses=3) expected size=2431 (actual=2415)
2024-04-01 22:09:05.526 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Multiple (messageId:2da46e5a396149b99e07f20c16981016)
2024-04-01 22:09:05.584 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Multiple (messageId:2da46e5a396149b99e07f20c16981016)
2024-04-01 22:09:05.584 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Appliance.Control.Multiple requests=3 (responses=3) expected size=1395 (actual=1371)
2024-04-01 22:09:05.585 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Multiple (messageId:229378f12e28495c935f960faada85af)
2024-04-01 22:09:05.621 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Multiple (messageId:229378f12e28495c935f960faada85af)
2024-04-01 22:09:05.622 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Appliance.Control.Multiple requests=3 (responses=3) expected size=3430 (actual=2141)
2024-04-01 22:09:05.622 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Polling end
2024-04-01 22:09:35.625 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Polling begin
2024-04-01 22:09:35.626 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Multiple (messageId:d1ab8e2bf70d46e08f330125ccc34a2b)
2024-04-01 22:09:35.669 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Multiple (messageId:d1ab8e2bf70d46e08f330125ccc34a2b)
2024-04-01 22:09:35.670 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Appliance.Control.Multiple requests=3 (responses=3) expected size=2393 (actual=2379)
2024-04-01 22:09:35.675 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Multiple (messageId:dde0dbec2b594db7b85186126182ea4d)
2024-04-01 22:09:35.737 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Multiple (messageId:dde0dbec2b594db7b85186126182ea4d)
2024-04-01 22:09:35.738 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Appliance.Control.Multiple requests=3 (responses=3) expected size=1440 (actual=1423)
2024-04-01 22:09:35.739 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Multiple (messageId:382b4ef5e47244d7906da0a96d4ab9d9)
2024-04-01 22:09:35.777 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Multiple (messageId:382b4ef5e47244d7906da0a96d4ab9d9)
2024-04-01 22:09:35.777 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Appliance.Control.Multiple requests=2 (responses=2) expected size=3050 (actual=1762)
2024-04-01 22:09:35.778 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] Polling end
2024-04-01 22:09:38.968 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Thermostat.ModeB (messageId:5a1bf7331bdb4bbb94e60a86366f2cd2)
2024-04-01 22:09:39.023 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Thermostat.ModeB (messageId:5a1bf7331bdb4bbb94e60a86366f2cd2)
2024-04-01 22:09:39.024 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215376737984] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
2024-04-01 22:09:39.968 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] TX(http) SET Appliance.Control.Thermostat.ModeB (messageId:55d1ad2283304a138f4da8f009692761)
2024-04-01 22:09:40.024 DEBUG (MainThread) [custom_components.meross_lan.mts960_###############################0] RX(http) SETACK Appliance.Control.Thermostat.ModeB (messageId:55d1ad2283304a138f4da8f009692761)
2024-04-01 22:09:40.026 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140215376737984] list index out of range
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 2319, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2356, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 905, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 975, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 864, in async_service_temperature_set
    await entity.async_set_temperature(**kwargs)
  File "/config/custom_components/meross_lan/devices/mts960.py", line 169, in async_set_temperature
    self._parse(payload[mc.KEY_MODEB][0])
                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
krahabb commented 7 months ago

Hello @pshirshov,

In order to correctly decode the actual device payloads I would need a 'complete' trace collected with these instructions

We have 2 orders of problems to solve through tracing:

After enabling the tracing feature then, you have 10 minutes (by default) to 'operate' the device with HA (and the app if you're still using that) in order to collect all the data/messages exchanged with the device.

beside these steps you could also enable the 'create diagnostic entities'. You should then see in the device panel in HA a whole new set of diagnostic sensors reporting the raw device data and you could check which values are reported for the different operating modes. If you like, you could try change the device operating mode (physically or with the app) and post here any mapping you can figure out. These values (namely, the 'Mode' sensor should map to each one of the 7 working modes) should change and reflect the inner device state.

If you're in for this deeper data collection/testing I suggest you to read #356 where support for mts960 was initially requested/implemented so that you have more insights (most of them were just speculations) about the device.