Installing Shelly dimmer for 1 gage light with switch

I live in an old house where the light switch only has a live in and out to toggle the light. I want to make the light smart and dimmable and was thinking op putting a shelly or sonoff mini at the lamp location to make it possible. the diagram would look like this:

Is this a valid setup?
I understand that if the switch is flipped that the shelly will no longer have power. However if i power it up will it turn the light? The ikea tradfri lights do do this for example.
I have been searching the web and have not been able to find a reference to similar setup yet. Has anyone set up something similar?

I assume, this is something you are looking for:

Yes those options are exactly what i am looking for!

Do you think that the electrical circuit that I present is possible using the shelly?

I am not good at this but I think, while the switch will be off, you will lose the option to see the status of the switch/shelly or control it.

Try this, switched live goes to l1 and not L

unfortunately i cannot use the setup that you are suggesting @Bluey since I live in an old house where the switch has no access to the the neutral cable, hence why i presented my electrical plan!

Shelly is going to release Dimmer SL device which doesn’t have to have the neutral cable.
I asked them back in January when the new device will be available and they said mid February.
It is still not available and last week they said me if will be available around May/Jun, so we have to wait a little.

You do not need ground. However you need to put Shelly into switch box.