jfarmer08 / ha-sengledapi

Home Assistant Integration for Sengled Bulbs. This is a custom component to allow control of Sengled Bulbs in Homeassistant using the unofficial Sengled API. Please note this mimics the Sengled app and therefore Sengled may cut off access at anytime.
Apache License 2.0
106 stars 35 forks source link

Switch Not Found in Entities - E1C-NB7 #58

Closed fathermahoney closed 2 years ago

fathermahoney commented 2 years ago

Thanks for making this plugin, it's very handy. I am running into an issue where some devices/entities are not appearing in Home Assistant. It seems to find all my devices, but it's failing to add the "switch" type device. Happy to share the entire log, but I wanted to trim it to what seems to be the most relevant. Thanks in advance!

Model: E1C-NB7

The API finds swtich devices, but it's seeing it as a bulb vs swtch. 2021-12-04 02:36:11 INFO (MainThread) [custom_components.sengledapi.sengledapi.devices.bulbs.bulb] SengledApi: Bulb switch_1 initializing.

Errors adding some entities: 2021-12-04 02:36:11 ERROR (MainThread) [homeassistant.components.light] Error adding entities for domain light with platform sengledapi

Error:

Logger: homeassistant.components.light
Source: components/light/__init__.py:414
Integration: Light (documentation, issues)
First occurred: December 3, 2021, 8:36:11 PM (2 occurrences)
Last logged: December 3, 2021, 8:36:11 PM

    Error adding entities for domain light with platform sengledapi
    Error while setting up sengledapi platform for light

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 316, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 422, in _async_add_entity
    capabilities=entity.capability_attributes,
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 414, in capability_attributes
    if supported_features & SUPPORT_COLOR_TEMP:
TypeError: unsupported operand type(s) for &: 'str' and 'int'