Is it possible to mark a sensor as unavailable?

I am trying to solve an issue for the integration

Specifically, the issue where fake data (arbitrary temperature value) is generated when the power inverter is offline:

The source code is here:

When an inverter is offline I would like to have Home assistant simply show a gap in the graphs, not “maintain” the previous value.
It should be replaced with an “empty” or “unavailable” or similar data point.

I have experience with ESPhome and it offers an option to mark sensor data as “expired”, maybe that could help:

But I found nothing similar in HA for integrations.

Can anyone suggest a solution?

the state 'unavailable' will show as a gap in the graph.

I tried to replace the temperature value in the source code linked above with the string “unavailable” but it didn’t work. How should I mark the sensor as “unavailable”? Just by omitting sending its value?

Or set its value to None

Might have been solved here: