# Scene with a button (double or single click)

**URL:** <https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167>\
**Category:** Développement\
**Created:** [March 10, 2021, 4:05pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167 "2021-03-10T16:05:02Z")\
**Posts on this page:** 14\
**Page:** 4

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [April 7, 2021, 1:16pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/61 "2021-04-07T13:16:50Z")

</div>

> [@pierre-gilles](#):
>
> > [@lmilcent](#):
> >
> > What do you mean by «&nbsp;live&nbsp;»?
> 
> The current sensor value!

For me, that’s exactly what «&nbsp;retrieve the last value&nbsp;» is for. So what would be the difference, being able to retrieve the current value or another one at a specific time?

> [@pierre-gilles](#):
>
> That’s normal, we don’t have the date/time comparison functionality for sensors at all yet. I agree, it’s essential. It’s funny, it’s not at all in the feature requests, I didn’t have that in mind so 😃

It’s true, but I’ve been thinking about it almost since the beginning. I’ll create it (one more) 🙂

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [April 7, 2021, 1:21pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/62 "2021-04-07T13:21:48Z")

</div>

> [@lmilcent](#):
>
> For me, that’s exactly what «&nbsp;retrieve the last value&nbsp;» is for. So what would be the difference, being able to retrieve the current value or another one at a specific time?

I was talking about simplifying the flow. Currently, you were complaining (rightfully so :p) about having to perform 2 steps to do a «&nbsp;continue only if&nbsp;» (the «&nbsp;retrieve the last value&nbsp;» + «&nbsp;continue only if&nbsp;»).

I suggest having directly in the «&nbsp;continue only if&nbsp;» the list of all devices, without having to do a «&nbsp;retrieve the last value&nbsp;» beforehand

---

<div class="post-metadata">

**Author:** ![lmilcent](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/lmilcent/32/7023_2.png) [@lmilcent](https://community.gladysassistant.com/u/lmilcent)\
**Post date:** [April 7, 2021, 1:22pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/63 "2021-04-07T13:22:34Z")

</div>

Oh yes, that would be awesome!!

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [April 7, 2021, 3:23pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/64 "2021-04-07T15:23:56Z")

</div>

> [@pierre-gilles](#):
>
> I suggest having the list of all devices directly in the «&nbsp;continue only if&nbsp;» without having to do a «&nbsp;retrieve the last value&nbsp;» beforehand

That would be cool! Another simplification

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [November 1, 2022, 9:47am UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/65 "2022-11-01T09:47:35Z")

</div>

Hello,  
I recently purchased an Aqara double button.  
I can’t get anything to work in scenes with 1, 2 or 5… because I think you need to specify left or right? But how? Or is that not yet supported?

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [November 1, 2022, 11:05am UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/66 "2022-11-01T11:05:30Z")

</div>

Can you tell us which model? I have several models from Aqara, maybe I can guide you?

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [November 1, 2022, 2:50pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/67 "2022-11-01T14:50:34Z")

</div>

@guim31 : thank you

Mine is this one :  
Wireless Remote Switch H1 (Double Rocker)  
Model : WRS R02

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [November 1, 2022, 8:23pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/68 "2022-11-01T20:23:57Z")

</div>

According to the Zigbee2mqtt documentation, here’s what the different buttons report:

> Action (enum)

Triggered action (e.g. a button click). Value can be found in the published state on the `action` property. It’s not possible to read (`/get`) or write (`/set`) this value. The possible values are: `single_left`, `single_right`, `single_both`, `double_left`, `double_right`, `double_both`, `triple_left`, `triple_right`, `triple_both`, `hold_left`, `hold_right`, `hold_both`.

So there’s no point in looking for 1, 2, 5 or other numbers!

---

<div class="post-metadata">

**Author:** ![Will\_71](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/will_71/32/9582_2.png) [@Will\_71](https://community.gladysassistant.com/u/Will_71)\
**Post date:** [November 1, 2022, 11:27pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/69 "2022-11-01T23:27:17Z")

</div>

@b3n.0 Your sensor is probably not yet supported. Submit a feature request and in the meantime you can use Node-RED to manage your button.

In Node-RED you can map the info that @guim31 gave you to numeric values so you can process them in Gladys scenes.

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [November 2, 2022, 10:43am UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/70 "2022-11-02T10:43:28Z")

</div>

Thank you for your replies.

> [@guim31](#):
>
> Triggered action (e.g. a button click). Value can be found in the published state on the `action` property. It’s not possible to read (`/get`) or write (`/set`) this value. The possible values are: `single_left`, `single_right`, `single_both`, `double_left`, `double_right`, `double_both`, `triple_left`, `triple_right`, `triple_both`, `hold_left`, `hold_right`, `hold_both`.

I checked zigbee2mqtt to retrieve the values above, but I can’t save a scene using them otherwise I get this:  
 ![image](https://gladys-assistant-community.b-cdn.net/uploads/default/original/2X/6/6dc427d7abed2056757f3755207d379d439da4c0.png)

So I suppose I should follow:

> [@\_Will\_71](#):
>
> Dans Node-Red tu peux coder les infos que @guim31 t’a donné en valeur numérique pour pouvoir les traiter dans des scènes Gladys.

But now I need to get to grips with Node-RED, which I don’t know at all…

I’ll take a look!

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [November 2, 2022, 1:58pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/71 "2022-11-02T13:58:35Z")

</div>

> [@b3n.0](#):
>
> I had a look at zigbee2mqtt to retrieve the values above, but I can’t save a scene using them otherwise I get this:

@pierre-gilles wouldn’t that be along the same lines as your message here : [Bouton Sonoff SNZB-01 - #72 par pierre-gilles](https://community.gladysassistant.com/t/bouton-sonoff-snzb-01/6812/72?u=guim31) ??

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [November 2, 2022, 3:03pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/72 "2022-11-02T15:03:23Z")

</div>

> [@guim31](#):
>
> @pierre-gilles wouldn’t this be along the same lines as your message here: [Sonoff SNZB-01 Button - #72 by pierre-gilles](https://community.gladysassistant.com/t/bouton-sonoff-snzb-01/6812/72) ??

Yes indeed! You need to make a feature request 🙂

---

<div class="post-metadata">

**Author:** ![b3n.0](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/b3n.0/32/3458_2.png) [@b3n.0](https://community.gladysassistant.com/u/b3n.0)\
**Post date:** [December 13, 2022, 10:57am UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/73 "2022-12-13T10:57:52Z")

</div>

I finally gave up on that Aqara double button…

In favor of a pack of 4 Sonoff (less pretty but they work perfectly).

---

<div class="post-metadata">

**Author:** ![guim31](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/guim31/32/4840_2.png) [@guim31](https://community.gladysassistant.com/u/guim31)\
**Post date:** [December 13, 2022, 12:06pm UTC](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167/74 "2022-12-13T12:06:28Z")

</div>

I created the feature request about this (but I’m not sure if I was very clear!)

> [@Utiliser un input dans les scènes plutôt qu'un sélecteur d'entiers](https://community.gladysassistant.com/t/utiliser-un-input-dans-les-scenes-plutoit-quun-selecteur-dentiers/7769):
>
> Actuellement dans le cadre de l’utilisation de boutons multiples connectés (Xiaomi ou autres) on ne peut pas les intégrer directement dans les scènes, car lorsqu’on leur appuie dessus, ce qui remonte c’est des choses du genre : single\_left, single\_right, single\_both, double\_left, double\_right, double\_both, triple\_left, triple\_right, triple\_both, hold\_left, hold\_right, hold\_both Or dans les scènes, nous ne pouvons utiliser que ça : Qui n’autorise que des entiers numériques. Il faudr…

[Previous page](https://community.gladysassistant.com/t/scene-avec-un-bouton-double-ou-simple-clic/6167.md?page=3)
