Giter VIP home page Giter VIP logo

Comments (6)

balloob avatar balloob commented on July 19, 2024 1

Custom components should not import from one another. If you want to import other custom components, do this:

# If it's a component
hass.components.casetify.some_method()

# If it's a platfrom
from homeassistant.loader import get_component
platform = get_component(hass, 'light.hue')

from lutron-caseta-pro.

upsert avatar upsert commented on July 19, 2024

I was able to fix the import problem by squeezing all the code into one file, but after that all my platforms are broken:

2018-05-05 16:08:06 ERROR (MainThread) [homeassistant.components.light] Error while setting up platform lutron_caseta_pro
Traceback (most recent call last):
  File "/home/neal/dev/src/home-assistant/homeassistant/helpers/entity_platform.py", line 125, in _async_setup_platform
    task = async_create_setup_task()
  File "/home/neal/dev/src/home-assistant/homeassistant/helpers/entity_platform.py", line 90, in async_create_setup_task
    None, platform.setup_platform, hass, platform_config,
AttributeError: module 'light.lutron_caseta_pro' has no attribute 'setup_platform'

I tried changing my async_setup_platform to setup_platform and removing the asyncio but it still doesn't work.

I don't know what they have been doing in the Home Assistant code, but it broke everything. :(

from lutron-caseta-pro.

cgarwood avatar cgarwood commented on July 19, 2024

Looks like there's another PR with fixes related to the custom_components fix, not sure if it will help in this case or not: home-assistant/core#14317

from lutron-caseta-pro.

czoog avatar czoog commented on July 19, 2024

Anybody try the released version of 0.69? Does it break this component?

from lutron-caseta-pro.

cgarwood avatar cgarwood commented on July 19, 2024

The custom_component changes to HomeAssistant were reverted, so this component is working again on the released 0.69 version.

from lutron-caseta-pro.

balloob avatar balloob commented on July 19, 2024

Then close this issue ;)

from lutron-caseta-pro.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.