# Webhook: Pass value to card

**URL:** <https://community.homey.app/t/webhook-pass-value-to-card/35534>\
**Category:** Questions & Help\
**Tags:** app, flow\
**Created:** [October 6, 2020, 8:05am UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534 "2020-10-06T08:05:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![johannes1702](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@johannes1702](https://community.homey.app/u/johannes1702)\
**Post date:** [October 6, 2020, 8:05am UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534/1 "2020-10-06T08:05:00Z")

</div>

Hi all,

I want to build a webhook which sets the volume of my Sonos speakers, so I can put it on my iOS Homescreen for quick access. In general it workes with a HTTP Request card.

But now I want to make it a bit more intelligent and pass a value (for the volume) to the Sonos volume card. However the value comes as string and not as number which for sure cannot be processed by the Sonos card. Is there any way to convert it from string to number? I want to avoid to have to create somewhat like 10 flows for each volume I would like to have. 🙂

Johannes

---

<div class="post-metadata">

**Author:** ![Walter\_vande\_kerkhof](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/walter_vande_kerkhof/32/28963_2.png) [@Walter\_vande\_kerkhof](https://community.homey.app/u/Walter_vande_kerkhof)\
**Post date:** [October 6, 2020, 10:19am UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534/2 "2020-10-06T10:19:05Z")

</div>

Hi, I have a similar solution. Slightly different because I don’t pass a value to homey. I have 2 flows which react on receiving an webhook. One flow increases the volume of my sonos with 0.05. The other one decreases the volume by 0.05

---

<div class="post-metadata">

**Author:** ![Shakesbeard](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/shakesbeard/32/15112_2.png) [@Shakesbeard](https://community.homey.app/u/Shakesbeard)\
**Post date:** [October 6, 2020, 10:24am UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534/3 "2020-10-06T10:24:21Z")

</div>

I solved this with a simple implementation in the Micro WebServer app.

---

<div class="post-metadata">

**Author:** ![johannes1702](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@johannes1702](https://community.homey.app/u/johannes1702)\
**Post date:** [October 6, 2020, 10:30am UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534/4 "2020-10-06T10:30:59Z")

</div>

What did you do there?

---

<div class="post-metadata">

**Author:** ![Rocodamelshekima](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rocodamelshekima/32/8209_2.png) [@Rocodamelshekima](https://community.homey.app/u/Rocodamelshekima)\
**Post date:** [October 6, 2020, 2:49pm UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534/5 "2020-10-06T14:49:04Z")

</div>

Check [this](https://community.homey.app/t/sonos-say/6697).

---

<div class="post-metadata">

**Author:** ![johannes1702](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@johannes1702](https://community.homey.app/u/johannes1702)\
**Post date:** [October 7, 2020, 3:42pm UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534/6 "2020-10-07T15:42:54Z")

</div>

Ok, actually quite simple to do. So hope this helps someone. When you set a value dynamically in a Sonos card, you have to provide it in the range of 0.01 and 1.0. (Carefull: 1 is very loud ;-))

So if you want to set it to 10 % you need this URL:  
`https://<HOMEYCLOUDID>.connect.athom.com/api/app/com.internet/sonos-volume/0.10`

And then you can use the tag in the Sonos card. Under AND you could even add a check that the value is below a certain number, for me I set it to 0.51 to prevent your speakers from blaring in case you go over 50 %. 😉

Sharing the flow here: [Shared Flow | Homey](https://homey.app/f/FlBK3k)

Johannes

---

<div class="post-metadata">

**Author:** ![johannes1702](https://avatars.discourse-cdn.com/v4/letter/j/db5fbb/32.png) [@johannes1702](https://community.homey.app/u/johannes1702)\
**Post date:** [October 7, 2020, 4:06pm UTC](https://community.homey.app/t/webhook-pass-value-to-card/35534/8 "2020-10-07T16:06:26Z")

</div>

Error corrected, it has to be the Homey Cloud ID.
