Skip to content

AttributeError: type object 'LightEffect' has no attribute 'COSMOS' #686

@alinelena

Description

@alinelena

i get this after the latest update

pydeconz is version 118

homeassistant

atomicwrites-homeassistant  1.4.1
home-assistant-bluetooth    1.13.0
home-assistant-frontend     20241031.0
home-assistant-intents      2024.10.30
homeassistant               2024.11.2
psutil-home-assistant       0.0.1

deconz version is 2.29.0 and run it via docker from here ghcr.io/deconz-community/deconz-docker:latest

i suspect there is a mistmatch of api since commenting few more effects

    EFFECT_COLORLOOP: LightEffect.COLOR_LOOP,
    "none": LightEffect.NONE,
    # Specific to Philips Hue
    "candle": LightEffect.CANDLE,
    # "cosmos": LightEffect.COSMOS,
    # "enchant": LightEffect.ENCHANT,
    # "fire": LightEffect.FIRE,
    "fireplace": LightEffect.FIREPLACE,
    # "glisten": LightEffect.GLISTEN,
    "loop": LightEffect.LOOP,
    #  "opal": LightEffect.OPAL,
    # "prism": LightEffect.PRISM,
    "sparkle": LightEffect.SPARKLE,
    # "sunbeam": LightEffect.SUNBEAM,
    "sunrise": LightEffect.SUNRISE,
    # "sunset": LightEffect.SUNSET,
    # "underwater": LightEffect.UNDERWATER,
    # Specific to Lidl christmas light

and allowing this to fail

                try:
                  if device.supported_effects is not None:
                    self._attr_effect_list = [
                        EFFECT_TO_DECONZ[el]
                        for el in device.supported_effects
                        if el in EFFECT_TO_DECONZ
                    ]
                except:
                     pass

things seem to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions