Custom component directory structure

Hi,

I am trying to use this code, and struggling. I notice that the directory structure has changed.

See here - https://github.com/home-assistant/home-assistant/compare/dev...JDW2018:texecom#diff-e1c133683430c68fd0effdc7ac2c7e1d

So it seems texecom.py should now be init.py like this …

custom_components/texecom/init.py
custom_components/texecom/binary_sensor.py

I am now getting

“Unable to prepare setup for platform texecom.binary_sensor: Platform not found (No module named ‘homeassistant.components.texecom’).”

I suspect because the follow call should look different in what is now init.py?

if zones:
hass.async_create_task(async_load_platform(
hass, ‘binary_sensor’, DOMAIN, {
CONF_ZONES: zones
}, config
))

Can anyone help with this?

Turns out it just wouldn’t work in the custom_components folder. I moved it into the main components folder and it works … who knows.