Complete card disappeared after editing tile in visual editor

I have a tile for the charge of a home battery. In the visilbilty I had entered (in YAML-mode) the following

This works fine.
However I wanted to experiment with the visibility and thus removed this text in the visual editor and added an alternative rule.
The effect was quit unexpected. Not only this tile was gone, but also the whole card where it resided on was invisible. Inspection of the file showed that indeed all code for that card was deleted. Are there any explanations or did I stumble upon a 'feature'?