# Philips Hue duration

**URL:** https://community.homey.app/t/philips-hue-duration/99494
**Category:** Apps
**Created:** [December 30, 2023, 10:10pm UTC](https://community.homey.app/t/philips-hue-duration/99494 "2023-12-30T22:10:05Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [December 30, 2023, 10:10pm UTC](https://community.homey.app/t/philips-hue-duration/99494/1 "2023-12-30T22:10:05Z")

</div>

Previously it was possible to set a duration when turning on and off lights in a Philips Hue group:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/8/c85547c0e05da9f42acad92cd9e6e821b9c370dd.png)

I have a few older flows where this still works as expected but it’s not possible for me to configure this setting for new flows. Has this (very useful) feature been removed or where can’t I find it?

---

<div class="post-metadata">

### Author: ![Philip\_Montgomery](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/philip_montgomery/32/12434_2.png) [@Philip\_Montgomery](https://community.homey.app/u/Philip_Montgomery)
#### Post date: [December 30, 2023, 10:41pm UTC](https://community.homey.app/t/philips-hue-duration/99494/2 "2023-12-30T22:41:55Z")

</div>

As far as I can tell it has been gone for quite some time, more than a year. Not sure why, maybe someone else can let us know. I have not found a reliable way to recreate this, I’ve tried chronograph app and a few others and the result is inconsistent and certainly not as good as the Hue app. What I have done is create scenes in the Hue phone app with specific names and work between scene activations. The scenes might be the same lights but at 10% “Living Room Spots 10%”, then “Living Room Spots 20%” etc

---

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [December 31, 2023, 11:40am UTC](https://community.homey.app/t/philips-hue-duration/99494/4 "2023-12-31T11:40:14Z")

</div>

But I don’t think it’s possible to switch between scenes using a duration? I would like the lights to dim slowly instead of near instantly.

---

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [December 31, 2023, 11:44am UTC](https://community.homey.app/t/philips-hue-duration/99494/5 "2023-12-31T11:44:35Z")

</div>

That’s how it used to be. But the option isn’t available anymore:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/b/fb981e116da2f1e5325346d1ae10624f9aed26d7.png)

---

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [December 31, 2023, 11:45am UTC](https://community.homey.app/t/philips-hue-duration/99494/6 "2023-12-31T11:45:07Z")

</div>

and using Advanced Flow:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/a/0ab8a4dc66eb92fd401d8088e26eabac7c9eb15f.png)

---

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [December 31, 2023, 11:45am UTC](https://community.homey.app/t/philips-hue-duration/99494/7 "2023-12-31T11:45:39Z")

</div>

Are you on the latest version of the Hue app?  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/7/0781fd74e6242f3364d5ebe8a5529f784244880c.png)

---

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [December 31, 2023, 11:46am UTC](https://community.homey.app/t/philips-hue-duration/99494/8 "2023-12-31T11:46:27Z")

</div>

Sorry about all the spam but:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/2/62d161c8c07846cc28c43b7e67764996efb13844.png)

🤷‍♂️

---

<div class="post-metadata">

### Author: ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)
#### Post date: [December 31, 2023, 11:53am UTC](https://community.homey.app/t/philips-hue-duration/99494/9 "2023-12-31T11:53:53Z")

</div>

Don’t use Philips Hue devices with the bridge, but you can try to check the test version of the Philips Hue app, because this version is updated to support Hue API v2:

> **[Philips Hue](https://homey.app/en-de/app/nl.philips.hue/Philips-Hue/)**
>
> Transform the way you experience light

---

<div class="post-metadata">

### Author: ![Rmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rmb/32/79135_2.png) [@Rmb](https://community.homey.app/u/Rmb)
#### Post date: [December 31, 2023, 11:58am UTC](https://community.homey.app/t/philips-hue-duration/99494/10 "2023-12-31T11:58:16Z")

</div>

> [@NielsLBeck](#):
>
> I would like the lights to dim slowly instead of near instantly.

For me it works using normal flows, defining the Hue lamps as Zigbee, and dimming one lamp.

 ![IMG_3015](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/7/674a639852dafe58c39daec0a7703c10c40fdf9f.jpeg)

---

<div class="post-metadata">

### Author: ![Philip\_Montgomery](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/philip_montgomery/32/12434_2.png) [@Philip\_Montgomery](https://community.homey.app/u/Philip_Montgomery)
#### Post date: [December 31, 2023, 2:31pm UTC](https://community.homey.app/t/philips-hue-duration/99494/12 "2023-12-31T14:31:34Z")

</div>

It isn’t in that it doesn’t replicate the function we used to have, you can have a delay between scene activations. Personally I don’t bother. I have scenes that come on at times specified using the Sun Events app and then alterations to those maybe twice over the course an hour

---

<div class="post-metadata">

### Author: ![Philip\_Montgomery](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/philip_montgomery/32/12434_2.png) [@Philip\_Montgomery](https://community.homey.app/u/Philip_Montgomery)
#### Post date: [December 31, 2023, 2:33pm UTC](https://community.homey.app/t/philips-hue-duration/99494/13 "2023-12-31T14:33:44Z")

</div>

Also doesn’t work, I’ve just looked at individual Hue lamps and the card for setting over a period time isn’t there anymore. That’s via Hue bridge and not without bridge. Have tried using Homey to control 115 lamps and there end up being random ones left out whereas via a Hue bridge and scenes the result, for me at least, has been far more reliable

---

<div class="post-metadata">

### Author: ![Philip\_Montgomery](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/philip_montgomery/32/12434_2.png) [@Philip\_Montgomery](https://community.homey.app/u/Philip_Montgomery)
#### Post date: [December 31, 2023, 2:34pm UTC](https://community.homey.app/t/philips-hue-duration/99494/14 "2023-12-31T14:34:27Z")

</div>

Interesting, didn’t know about this

---

<div class="post-metadata">

### Author: ![Philip\_Montgomery](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/philip_montgomery/32/12434_2.png) [@Philip\_Montgomery](https://community.homey.app/u/Philip_Montgomery)
#### Post date: [December 31, 2023, 3:25pm UTC](https://community.homey.app/t/philips-hue-duration/99494/16 "2023-12-31T15:25:00Z")

</div>

What’s disappointing is that it used to be possible to use that card with a scene. I’ll be having a look at the beta version in a bit. Batch cooking currently. Sent Homey a diagnostic for the Bosch app, hasn’t worked in more than a month. I have flows that flash Hue lights different colours when the oven/dishwasher/micro program is finished and those flows haven’t worked in ages (sorry, off topic)

---

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [December 31, 2023, 3:38pm UTC](https://community.homey.app/t/philips-hue-duration/99494/17 "2023-12-31T15:38:44Z")

</div>

Yes, I would like to dim the whole group at once instead of the lights individually - much better experience.

Fortunately I have multiple flows where the duration property is available. Duplicating those flows seems to work as expected - so I can create small flows simply dimming the lights with a duration. Not the best developer experience - but it works.

The funny thing is, the application understands and uses the property correctly but it doesn’t expose the property to the user interface 🤔

---

<div class="post-metadata">

### Author: ![NielsLBeck](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nielslbeck/32/96291_2.png) [@NielsLBeck](https://community.homey.app/u/NielsLBeck)
#### Post date: [January 1, 2024, 8:58pm UTC](https://community.homey.app/t/philips-hue-duration/99494/18 "2024-01-01T20:58:39Z")

</div>

My current solution:

I’ve created the following HomeyScript for dimming the groups using a duration.

```auto
if (typeof args[0] !== 'string') {
   throw new Error('This script must be run from a Flow!');
}

var argsObj = JSON.parse(args[0]);

const groupName = argsObj.groupName;
const brightness = argsObj.brightness;
const duration = argsObj.duration;

// The follow array can be generated this way: Create a the 'Turn all lights on in <group>' flow card 
// and insert the network response here
const allGroups = [
    {
        "id": 0,
        "bridge_id": "xxxxxxxxxxxxxxxx",
        "name": "The name of a room",
        "description": "The name of the bridge"
    },
    ...
];

const currentGroups = allGroups.filter(g => g.name === groupName);

for (var groupIndex in currentGroups) {
  let currentGroup = currentGroups[groupIndex];

  await Homey.flow.runFlowCardAction(
    {
      uri: 'homey:app:nl.philips.hue',
      id: 'homey:app:nl.philips.hue:groupSetBrightness',
      args: {
      group: {
        id: currentGroup.id,
        bridge_id: currentGroup.bridge_id,
      },
      brightness: brightness
    },
    duration: duration
  });
}

```

I’m then calling the script from my flows, where I can even provide the duration using a variable (which isn’t possible using the Hue flow card directly):  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/b/ab6d85530957872b573451b0f093315c6fbd4f4e.png)
