Configuring TP-Link Matter dimmer switches - KS225 and S505D

I had a lot of trouble with these switches going offline to HA and Alexa. The indicator light would go solid orange. The TP-Link app says that means they lost their Internet connection, but they already had one and Matter devices shouldn’t need one.

Starting from scratch, I reset the switches, and added them to HA using the HA mobile app. Then I used “Share Device” in the HA mobile app to generate a code to add them as Matter devices in the Alexa app. All of this went very smoothly.

My only problem at this point is that HA doesn’t have a way to run the routine that sets the dimming range. AFAIK, that routine is only available in the TP-Link Tapo or Kasa apps. And it looks like there is no way to add the switches to those apps without resetting them. What am I missing here?

In previous attempts, I added the switches to the Tapo app first, and then to HA and Alexa afterwords. This consistently gave me switches that always worked in the Tapo app, but frequently went off-line to HA and Alexa until I restarted their network connection.