Saving state on appliance type

Please review changes and merge if the issue seems resolved
https://redmine.dev.cyfronet.pl/issues/3294
Use `%q` only for strings that contain both single quotes and double quotes.