Aha! I should use async_setup_platform
instead of async_setup_entry
.
1 Like
So I got a lot further, and now I have a new problem! I have a switch.py
with a PLATFORM_SCHEMA
and async_setup_platform
, but I cannot get Home Assistant to run it. My async_setup
in __init__.py
is returning True
, so I’m not sure why it doesn’t move on to configure the switches after that. I filled it with print
and _LOGGER
statements, but I get no output.
It all you want is a platform you don’t need any code in init file
I have an init because I must connect to the board and share that between multiple platforms. I put what I have so far in a gist: https://gist.github.com/DaAwesomeP/a7b26955f19c26c58ee0bf0fc872cb59