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

Перестали работать лампы, проброшенные из УДЯ #465

Closed
KotsAO opened this issue Feb 27, 2024 · 10 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@KotsAO
Copy link

KotsAO commented Feb 27, 2024

После обновления 2024.2.4 при загрузке не подключаются лампы из УДЯ. Система пишет:

Logger: homeassistant.components.light
Source: helpers/entity_platform.py:344
Integration: Освещение (documentation, issues)
First occurred: 16:17:06 (1 occurrences)
Last logged: 16:17:06

Error while setting up yandex_station platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/yandex_station/light.py", line 15, in async_setup_entry
    YandexLight(quasar, device)
  File "/config/custom_components/yandex_station/core/entity.py", line 54, in __init__
    self.internal_update(
  File "/config/custom_components/yandex_station/light.py", line 86, in internal_update
    self._attr_hs_color = (value["h"], value["s"])
                           ~~~~~^^^^^
TypeError: 'int' object is not subscriptable
@AlexxIT AlexxIT added the question Further information is requested label Feb 27, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Feb 27, 2024

Скачайте диагностику интеграции и выложите её сюда. Либо найдите там проблемную лампу и выложите только её.

@KotsAO
Copy link
Author

KotsAO commented Feb 27, 2024

Выяснилось, что проблема с одной лампой - вот этой:

  {
    "id": "633a61dc-2c18-4fdb-bc42-1aac32e99c9e",
    "name": "\u041b\u0430\u043c\u043f\u0430",
    "type": "devices.types.light",
    "icon_url": "https://avatars.mds.yandex.net/get-iot/icons-devices-devices.types.light.svg/orig",
    "capabilities": [
      {
        "reportable": true,
        "retrievable": true,
        "type": "devices.capabilities.on_off",
        "state": {
          "instance": "on",
          "value": true
        },
        "parameters": {
          "split": false
        }
      },
      {
        "reportable": true,
        "retrievable": true,
        "type": "devices.capabilities.color_setting",
        "state": {
          "instance": "color",
          "value": {
            "id": "",
            "name": "",
            "type": "white",
            "value": 3012
          }
        },
        "parameters": {
          "instance": "color",
          "name": "\u0446\u0432\u0435\u0442",
          "palette": [
            {
              "id": "soft_white",
              "name": "\u041c\u044f\u0433\u043a\u0438\u0439 \u0431\u0435\u043b\u044b\u0439",
              "type": "white",
              "value": {
                "h": 32,
                "s": 67,
                "v": 100
              }
            },
            {
              "id": "warm_white",
              "name": "\u0422\u0435\u043f\u043b\u044b\u0439 \u0431\u0435\u043b\u044b\u0439",
              "type": "white",
              "value": {
                "h": 33,
                "s": 49,
                "v": 100
              }
            },
            {
              "id": "white",
              "name": "\u0411\u0435\u043b\u044b\u0439",
              "type": "white",
              "value": {
                "h": 33,
                "s": 28,
                "v": 100
              }
            },
            {
              "id": "daylight",
              "name": "\u0414\u043d\u0435\u0432\u043d\u043e\u0439 \u0431\u0435\u043b\u044b\u0439",
              "type": "white",
              "value": {
                "h": 36,
                "s": 35,
                "v": 97
              }
            },
            {
              "id": "cold_white",
              "name": "\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0431\u0435\u043b\u044b\u0439",
              "type": "white",
              "value": {
                "h": 222,
                "s": 4,
                "v": 98
              }
            }
          ],
          "custom_palette": null,
          "scenes": [],
          "custom_scenes": null,
          "available_custom_settings": false,
          "temperature_k": {
            "min": 2000,
            "max": 6500
          }
        }
      },
      {
        "reportable": true,
        "retrievable": true,
        "type": "devices.capabilities.range",
        "state": {
          "instance": "brightness",
          "value": 3
        },
        "parameters": {
          "instance": "brightness",
          "name": "\u044f\u0440\u043a\u043e\u0441\u0442\u044c",
          "unit": "unit.percent",
          "random_access": true,
          "looped": false,
          "range": {
            "min": 1,
            "max": 100,
            "precision": 1
          }
        }
      }
    ],
    "properties": [],
    "item_type": "device",
    "skill_id": "c927bb15-5ecb-472a-8895-c3740602d36a",
    "room_name": "\u041a\u043e\u0440\u0438\u0434\u043e\u0440",
    "state": "online",
    "created": "2021-04-18T10:24:26Z",
    "parameters": {
      "device_info": {
        "manufacturer": "Aqara",
        "model": "ZNLDP12LM",
        "hw_version": "1.0",
        "sw_version": "0.0.0_0034"
      }
    }
  },

@illuvialsky
Copy link

illuvialsky commented Feb 27, 2024

Аналогичная проблема, все три лампы (разные производители) проброшенные из УДЯ перестали работать.

yandex_station-2ba3e4ee3154c072591291e376b36932-Люстра-f4bb086909b3d9ea6c254529342217f2.json
yandex_station-2ba3e4ee3154c072591291e376b36932-Лампочка-e402a574fcbbfdcc7731128f359c8b5a.json
yandex_station-2ba3e4ee3154c072591291e376b36932-Люстра-025b5ca5ff28acca7a0970bfd7803718.json

UPD.

Проблема возникла приблизительно вчера вечером на версии 2024.2.2, обновление до 2024.2.4 проблему не решило.

Лог ошибки из HAAS консоли:

2024-02-27 20:31:47.375 ERROR (MainThread) [homeassistant.components.light] Error while setting up yandex_station platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/yandex_station/light.py", line 15, in async_setup_entry
    YandexLight(quasar, device)
  File "/config/custom_components/yandex_station/core/entity.py", line 54, in __init__
    self.internal_update(
  File "/config/custom_components/yandex_station/light.py", line 86, in internal_update
    self._attr_hs_color = (value["h"], value["s"])

@AlexxIT AlexxIT added bug Something isn't working and removed question Further information is requested labels Feb 27, 2024
@AlexxIT AlexxIT self-assigned this Feb 27, 2024
@Alatushko666
Copy link

Alatushko666 commented Mar 1, 2024

Yeelight Ceiling Light A2001C550 YLXD031 точно так же стал недоступен, был проброшен и УДЯ, т.к. по другому не получилось подключить к ХА. Удалил запись из конфиг-файла, удалил объект из ХА, добавил снова в yaml, но устройство не добавляется. Раньше было 1 устройство - 2 объекта.
"type": "devices.types.light", "device_info": { "manufacturer": "yeelink", "model": "yeelink.light.ceila", "sw_version": "2.1.7_0011" }
"installation_type": "Home Assistant OS", "version": "2024.2.5", "yandex_station": { "version": "3.13.2", "hacs": { "version": "1.34.0",

@illuvialsky
Copy link

Без каких-либо дополнительных действий функционал восстановился.

@AlexxIT
Copy link
Owner

AlexxIT commented Mar 7, 2024

Потому что всё ломают только лампы в режиме белого цвета.

AlexxIT added a commit that referenced this issue Apr 3, 2024
@AlexxIT AlexxIT added this to the v3.14.0 milestone Apr 4, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 5, 2024

@AlexxIT AlexxIT closed this as completed Apr 5, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Apr 16, 2024

@KotsAO а через какой навык добавлена ваша лампа Aqara?

@KotsAO
Copy link
Author

KotsAO commented Apr 16, 2024

@KotsAO а через какой навык добавлена ваша лампа Aqara?

Через https://dialogs.yandex.ru/store/skills/25c37776-aqara

@AlexxIT
Copy link
Owner

AlexxIT commented Apr 17, 2024

Понятно. Они криво реализовали API Яндекса. Если есть желание - можно им написать, чтоб поправили. Такого не должно быть:

"state": {
  "instance": "color",
  "value": {
    "id": "",
    "name": "",
    "type": "white",
    "value": 3012
  }
}

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
Development

No branches or pull requests

4 participants