Inject variables into scenes

Hello everyone,

I’m working on a much-requested feature that I think will be useful to many people: the ability to inject a variable into scenes!

Here’s a sneak peek of the feature:

Edit: the PR:

(It’s WIP)

Small video demonstration:

https://streamable.com/wjwojf

I just pushed the first POC of the feature to GitHub. I’m open to any feedback on the PR/test/UX feedback :slight_smile:

Hello. I took a look at the PR and there is an initialization error with tagify

Uncaught (in promise) TypeError: _this.props.action.text is undefined
initTagify SendMessageParams.jsx:102
refreshVariables SendMessageParams.jsx:78
promise callback*SendMessageParams/_this.refreshVariables/< SendMessageParams.jsx:76
refreshVariables SendMessageParams.jsx:49
componentWillReceiveProps SendMessageParams.jsx:138

I tried in every way, with different devices or actions in the previous groups :neutral_face:

Oh bother! Thanks for the feedback. I’ll let you know when it’s fixed :slight_smile:

@cicoub13 normally it’s good I pushed a fix!

Let me know if you see other bugs. Don’t hesitate to brutalize the feature, it needs to be robust!

Hi, I checked out the branch to test.

On Chromium/Firefox nothing pops up when I type {{

So I thought to myself « Vincent, you messed up, you’re not on the right branch » :slight_smile:

Apparently yes ^^

Does it only work for sensors?

Well, maybe it’s not clear, but you must have a box that sets a variable to use variables!

Good point :slight_smile:

Here’s an example of a scene:

Any ideas on how to make this clearer?

Oh yes it works better ^^

Small glitch on FF

I think we need to indicate (when nothing pops up ^^) that you first need to retrieve the device value.
Because I must admit it wasn’t clear (even if it’s logical in the end).

Oops. I’ll check, but it’s a ready-made library I’m using, I hope it’s not serious ^^

Good idea!

Everything works on Firefox at my place, I think it’s a problem because your box is too long!

Edit: it’s indeed a text size issue.

We could even make the box bigger to allow larger variables to fit:

Before:

After:

I think this feature request can be closed :wink: