Feature type for pollen

Hello,

Following this tutorial: Tuto - Récupérer les infos sur le risque pollens it would be interesting to have a type of feature related to the pollen value :wink:

The values returned without modification by MQTT are:

0 = None (Green background)
1 = Low (Yellow background)
2 = Medium (Orange background)
3 = High (Red background)

On the screenshot below it says none because it’s a value modified by MQTT :wink:

image

Thanks :wink:

Hi @prohand :slight_smile:

J’ai rajouté un nouveau type « Risk level », je pense que ce type peut même servir pour ton autre demande « Weather alert » ( Type de fonctionnalité pour la vigilance météo )

Le titre est bien-sûr à choisir par l’utilisateur, et il y a 4 types d’icônes :

Côté MQTT, il y a 4 valeurs à envoyer, les mêmes que tu avais spécifié dans ton post:

0 = No risk (green background)
1 = Low (yellow background)
2 = Medium (orange background)
3 = High (red background)

La PR est relativement simple:

What do you think? :slight_smile:

5 Likes

The question isn’t for me but I think that’s really great :smiley:

I think it’s great :wink:

A big thank you Pierre-Gilles.

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 :wink:

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.

Thanks :wink:

I actually think it works very well for the alert level :slight_smile:




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 :slight_smile:

What do you think?

1 Like

Indeed, I didn’t see it that way but with the explanations it’s much clearer :wink:

When will it be deployed? I can’t wait now :face_with_open_eyes_and_hand_over_mouth::disguised_face:

It’s merged and it will be in the next Gladys release :slight_smile:

3 Likes

Cool thanks :wink:

1 Like

This feature is available in Gladys Assistant 4.41 :

I’m closing this topic to free up the votes, feel free to create other topics if you have feedback/bugs :slight_smile:

1 Like