Masking connection issues on sensor

The copy method. Use a template sensor:

There’s an example here: Use last attribuite instead of unavailable - Rest sensor