I don’t know if this could also fall under weather alerts because the value 1 is in green instead of 0 here and so on for the other numbers and the text about the vigilance level isn’t the same
I have the impression that we won’t have a choice but to do this for the pollen risk and risks in general for other topics, but that we’ll have to create another specific PR for weather vigilance which I can do if you want, based on what was done here.
For the values, the goal is not to match exactly; here I adopted the numbers you had given me because it made sense to use 0 to 4, but if, for example, the API you were using went from -1 to 3, I wouldn’t have used that.
In Gladys, on the technical side we avoid taking the exact format of a third-party API as a reference; we try to define a format that fits « as best as possible » all devices on the market, and then each integration is responsible for doing the conversion.
Concrete example: the « Color control » feature of a bulb: some brands send hexadecimal, others RGB, others integer. In Gladys, we arbitrarily chose to use integer, and each integration does the conversion work in both directions.
For your alert level, I think this feature does the job very well, and in your Node-RED you just need to do a conversion