That’s right, it will never work because icon parameter with hyphens is not allowed and messes up.
The easiest way to do this is to create your own dynamic icon set. You can copy the standard images to new files with new filenames.
Work out if you want
You must have a default icon with no hyphen in the filename, whether you expect to use it or not. All lowercase.
This will show up if nothing else matches, so use this for your UNDEF requirement.
You would probably copy the standard red siren icon.
You want something different for state 0, so you need another file
This will show up if the state is numeric 0, or greater with no other numeric matches.
You would probably copy the grey siren icon for this.
You want something different for state 1 or more, so you need another file
This will show up if the state is numeric 1, or greater with no other numeric matches.
You would probably copy the red siren icon for this.
With that set, if the state is value 1.314 or 10 or so on, the -1 icon will be displayed.
Put your set of icons in the /conf/icons/classic folder (even if you use BasicUI) and select them in your sitemap
Group item=alarm icon="mycustomgroupicon"