Cannot get started with new device development

I am still very new with HA, and I am trying to develop integration for the device I have that is not already supported. After reading many pages, I still cannot get basic stuff going - e.g. registration of the integration.

So I tried something that, in my mind, should just work:

  • I copied complete content of: core/homeassistant/components/acer_projector under /homeassistant/custom_components/mytest
  • I changed only manifest.json file to change domain to “mytest”
  • restarted HA,
  • tried to register component in configuration.yaml
switch:
  - platform: mytest
    filename: /dev/ttyUSB0

I get an error:
Platform error 'switch' from integration 'mytest' - Integration 'mytest' not found.

If I modify platform to acer_projector, it does not complain.

I am testing on OS version 2024.1.6.

What am I doing wrong?

You’ll have more traction dev questions by posting them on the HA Discord.

You also need to add a “version” tag for custom components, e.g.

[...]
  "iot_class": "local_polling",
  "requirements": ["pyserial==3.5"],
  "version": "2024.1"
}

Thank you, that was a good catch.

I added version info, rebooted HA, but unfortunately I still get the same error :slightly_frowning_face:

What does the log says regrading the custom component?
You alway have warnings / errors regarding those at the start of the log, e.g.

2024-02-04 12:02:50.329 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration apache_kafka which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-02-04 12:02:50.329 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration onkyo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-02-04 12:02:50.329 ERROR (SyncWorker_3) [homeassistant.loader] The custom integration 'onkyo' does not have a version key in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details
2024-02-04 12:02:50.330 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration mqtt_discoverystream which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-02-04 12:02:50.331 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration amazon_price which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-02-04 12:02:50.331 ERROR (SyncWorker_3) [homeassistant.loader] The custom integration 'amazon_price' does not have a version key in the manifest file and was blocked from loading. See https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes#versions for more details

OMG, thanks for this comment.

I had syntax error in JSON, and that was cause of problems. It works now :+1:. In the end it was missing version and I introduced a syntax error while adding version.

Thank you so much for your help!