En tant qu’utilisateur
Je veux pouvoir injecter une variable de scene dans une requête http
Afin de pouvoir faire des requêtes contenant des informations pertinante (état douverture de porte par exemple)
En tant qu’utilisateur
Je souhaiterais pouvoir injecter une variable de scène dans un bloc contrôler un appareil
Afin de pouvoir definir une valeur a une fonctionnalité (recuperation qualités dair via api cf : Nouvelle vidéo : Gladys Assistant chez vous #5, Cyril et son café prêt tous les matins grâce à Gladys! - #15 par pierre-gilles )
Je trouve que c’est une bonne fonctionnalité donc j’ai même voté pour
1 Like
Mes sonos vont elle enfin pouvoir me dire qu’elle est la température de la chambre de ma fille ?
Si en plus tu joue la carte “enfant”, tu vas me le faire développer encore plus vite aha
2 Likes
Elle a 8 mois c’est mieux ?! XD
2 Likes
VonOx
March 9, 2022, 7:52pm
6
Oui elle te répondra de regarder ton Dashboard
je vote pour car j’ai des sonos aussi, et des enfants aussi !!
1 Like
guim31
March 9, 2022, 9:01pm
8
Ma fille a 15 mois…
Pour autant je ne sais même pas de quoi on parle avec des injections http
Une alerte vaut mieux que rien xD
En gros je me suis fais une api côté node red
Et lorsque j’envoie cette action côté gladys
Et que je lui passe un text + une pièce alors j’ai un message vocal (pour l’instant google) sur ma ou mes sonos
3 Likes
guim31
March 10, 2022, 7:56am
11
Ah ouais en effet c’est TRES sympa ça ! J’aime beaucoup le principe.
J’imagine ça chez moi avec le status de l’alarme :
“Mise en marche de l’alarme dans 30sec”
Bip – Bip – Bip – …
“Alarme mise en marche”
“Alerte détectée - Appel des secours en cours”
Etc… J’adore
2 Likes
Va falloir créer des bots qui vote (pas le choix ^^)
1 Like
Je vote pour ! En fait, j’avais poussé la même idée en novembre, mais elle n’avait pas eu autant de succès : Permettre d'injecter une variable dans une action "faire une requête HTTP"
Effectivement, est il possible de fusionné les deux ainsi que les votes @pierre-gilles / @VonOx / @Tlse-vins ?
Fusionner ce n’est pas possible à ma connaissance mais il faut dire a @Lokkye de supprimer son vote de l’autre et de voter sur celle-ci.
On pourra fermer l’autre demande.
Lokkye
April 18, 2022, 3:50pm
16
Je viens de supprimer mon vote sur l’autre
1 Like
Hi everyone!
I worked on this topic today. It’s not the most requested topic on the forum, but it’s a « quick win » and I think this feature is very useful for people who want to switch to Gladys while keeping another instance alongside (HA (Home Assistant), Node-RED, etc..) to manage devices not handled by Gladys.
For the « Make an HTTP request » action, it looks like this:
Same behavior as the « Send a message » action
The PR is available here:
master ← new-variable-injected-component-scene
ouvert 03:52PM - 23 May 22 UTC
### Pull Request check-list
To ensure your Pull Request can be accepted as fa… st as possible, make sure to review and check all of these items:
- [x] If your changes affects code, did your write the tests?
- [x] Are tests passing? (`npm test` on both front/server)
- [x] Is the linter passing? (`npm run eslint` on both front/server)
- [x] Did you run prettier? (`npm run prettier` on both front/server)
- [x] If you are adding a new features/services, did you run integration comparator? (`npm run compare-translations` on front)
- [x] Did you test this pull request in real life? With real devices? If this development is a big feature or a new service, we recommend that you provide a Docker image to [the community](https://community.gladysassistant.com/) for testing before merging.
- [x] If your changes modify the API (REST or Node.js), did you modify the API documentation? (Documentation is based on comments in code)
- [x] If you are adding a new features/services which needs explanation, did you modify the user documentation? See [the GitHub repo](https://github.com/GladysAssistant/v4-website) and the [website](https://gladysassistant.com).
- [x] Did you add fake requests data for the demo mode (`front/src/config/demo.js`) so that the demo website is working without a backend? (if needed) See [https://demo.gladysassistant.com](https://demo.gladysassistant.com).
NOTE: these things are not required to open a PR and can be done afterwards / while the PR is open.
### Description of change
Please provide a description of the change here. It's always best with screenshots, so don't hesitate to add some!
However, I can’t really see how we could do this in the « Control a device » action because that view doesn’t have any text fields.
I wonder if in the end it’s not a different development..
Those of you who wanted this feature in the « control a device » action, what would you have used it for?
Do you have an example use case?
2 Likes
VonOx
May 23, 2022, 4:22pm
18
You make a GET request that retrieves a value, and that value allows you to set the state of a Gladys device. It doesn’t matter which feature.
That avoids using Node-RED just to do that (in practice it can be complicated if you need to convert the data type…)
1 Like
Ok I see, indeed that’s useful.
Besides, in this case it’ll be a totally different visual, since we just want to inject a « pure » value, and not concatenated text like when sending a message or an HTTP request.
The problem of data conversion is also important, because then it’s no longer text but numbers that we send.
So it will be a different PR then.
I thought it was in the new
1 Like