home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.15k stars 30.19k forks source link

Integration custom_component xxx cover: error Platform not found: cover.xxx #23696

Closed mariowitdoek closed 5 years ago

mariowitdoek commented 5 years ago

Home Assistant release with the issue: 0.92.2

Last working Home Assistant release (if known): 0.82

Operating environment (Hass.io/Docker/Windows/etc.): Hass.io (on Debian 9 on ESXi 6.5 and Intel NUC)

Component/platform: custom_component - cover

Description of problem: I have changed my own custom_component for qbus (a mqtt wrapper with extra post processing) to the new concept (folder qbus, init.py, manifest.json, cover.py without DEPENDENCIES) but it gives all the time "Platform not found: cover.qbus". The conversion of sensor and light were well successfull (with the same concept of setup_platform and custom class).

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

light:
  - platform: qbus
    type: dimmer
    name: slaapkamer
    name_qbus: l kamer pa
  - platform: qbus
    type: switch
    name: badkamerspiegel
    name_qbus: l bad spiege

cover:
  - platform: mqtt
    command_topic: "home-assistant/cover/set"
  - platform: qbus 
    name: slaapkamer_vierkant
    name_qbus: r pa vkt

Traceback (if applicable):

Additional information: Can it be that when one 'platform not found' has occurred, it stays no matter what you change? I copied the MQTT component and altered until I got this error. When going back to previous (successfull) code, the error stayed. I used the visual studio code addin to change yaml's and py-files.

alex-0103 commented 5 years ago

Hello there, i am facing a similar problem. The only difference is that my component is a climate device. The component is working as expected with 0.88.1 but gives the same error as yours when using the current dev-branch 0.93. Maybe the source of the trouble is the same. My configuration.yaml looks similar:

climate:
  - platform: warmup4ie_cc
    name: Bodenheizung
    username: xxx@yyy.de
    password: !secret warmup_password
    location: zu Hause
    room: Dachgeschoss

On the command line, "hass --script check_config" gives no issues for 0.88.1 but fails with "- Platform not found: climate.warmup4ie_cc" on 0.93 dev. file/directory structure is as follows: grafik

alex-0103 commented 5 years ago

Hello, at least for my component i was able to solve the problem. Some of the constants i am using have been moved from homeassistant.components.climate to homeassistant.components.climate.const. Strange that this was giving me no errors when loading the component.

mariowitdoek commented 5 years ago

hello everybody,

I've been searching whole week but no solution. In the end I have created a custom component folder "mario" with manifest for domain "mario" and ... a copy of cover.py from main branch of HA. Strangely enough, again the message "Platform not found: cover.mario" appears :(

Please help because, it will help the WAF-factor of domotics.

Mario

alex-0103 commented 5 years ago

Mario, it would be helpful to know which version of HA you are using. As you know, there have been breaking changes lately; this might be related. And it would be good to see your folder structure and, if possible, your component code too. With this little information you gave in your post, it is very hard to pin the problem. regards Alex And yes, raising the WAF-factor is always a primary goal :-)

stale[bot] commented 5 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.