def is_closed(self) -> bool | None:
        """Return if the cover is closed."""
        if self._data_point.is_valid:
            return self._data_point.is_closed
        if (
            self.is_restored
            and self._restored_state
            and (restored_state := self._restored_state.state)
            not in (
                STATE_UNKNOWN,
                STATE_UNAVAILABLE,
            )
        ):
            return restored_state == STATE_CLOSED
        return None
Return if the cover is closed.
custom_components/homematicip_local/cover.py