First integration: What's the minimum?

Hello,

following (yes, really!) Creating your first integration | Home Assistant Developer Docs, I kind of struggle to make this a minimal, albeit working first integration.

Starting with the scaffold, I did:

Remove the sync version from init.py
essentially leaving only:

async def async_setup_entry(hass: HomeAssistant, entry: SungrowConfigEntry) -> bool:
    await hass.config_entries.async_forward_entry_setups(entry, _PLATFORMS)
    return True

async def async_unload_entry(hass: HomeAssistant, entry: SungrowConfigEntry) -> bool:
    """Unload a config entry."""
    return await hass.config_entries.async_unload_platforms(entry, _PLATFORMS)

Remove config_flow.py and disable config flow in manifest
Take example sensor from documentation and copy it into sensor.py

Much cargo cult like programming…

Adding sungrow: to the configuration.yaml says that the integration cannot be set up from YAML. But neither can it be found on the Web UI.

Everything can be found at core/homeassistant/components/sungrow at dev · floli/core · GitHub

Is there a really minimum integration, that only does set a static sensor value?
What do I need to enable adding the component from the the web UI? Without any config flow for the beginning?

Thanks for getting me started with that!

Any clues from following a similar integration?

Hey, thanks for your reply!

Right now, my focus is less what the integration is actually doing, I was rather in search for any good purpose to discover how to build an integration.

My main question here: How to make a very basic integration and have it show up in the web UI?

Following Creating your first integration | Home Assistant Developer Docs, I added the two files, only renaming the domain. Shown here:

Also added to configuration.yaml:

sungrowtesttwo:

However, no integration of that name shows up or can be added.

Can you give me any hints what is missing here or how my expectation is wrong?

Best Thanks!

Ok, I was able to get a sample integration into the web UI by using the blueprint from GitHub - ludeeus/integration_blueprint: Blueprint for custom_component developers. and placing the code at config/custom_components and not homeassistant/components.

The official scaffold, however, does not seem to work in either location.