# Homeyscript for EvoHome - Temporary Temperature

**URL:** <https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926>\
**Category:** Questions & Help\
**Created:** [November 16, 2021, 4:03pm UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926 "2021-11-16T16:03:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/davidh/32/46160_2.png) [@DavidH](https://community.homey.app/u/DavidH)\
**Post date:** [November 16, 2021, 4:03pm UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926/1 "2021-11-16T16:03:52Z")

</div>

Hi, I’m doing some coding in Homeyscript and I’m running in to an issue I hope someone can help me with. The situation is pretty straightforward, I have [Ralf van Dooren’s EvoHome app](https://homey.app/nl-nl/app/nl.bevlogenheid.evohome/Honeywell-Evohome/) installed and it works perfectly. I use flows to either set the target temp for a few hours, or to cancel what I set up, so the normal program kicks back in.

I want to do the same in Homeyscript, but I’ve noticed the capabilities that the flow-cards offer are not al straight-forward capabilities for Homeyscript. Basically, controlling the device is just setting a capability: `Homey.devices.getDevice({id: 123-ABC}).setCapabilityValue('target_temperature', 20);` which works as it should. The only issue is it sets the new temperature indefinitely. As I have a program running on the EvoHome itself, I want Homey to set the new temperature for a few hours, and then back to normal programming.

This is possible in the flows:

 ![Screenshot 2021-11-16 at 16.59.27](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/0/402e7c0515d46b1f44284ede4a40034a6862d53a.png)  
(setting temp for 2 hours, and also simply cancelling the setting al together)

but I only have the `'target_temperature'` capability in HomeyScript. Is there something I’m missing in the capabilities, or am I just out-of-luck? Obviously this is possible, as the flow-cards can do it, I just can’t seem to find how.

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [November 17, 2021, 4:13am UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926/2 "2021-11-17T04:13:41Z")

</div>

In Homeyscript there is an example example-flowcard-run.js that is able to run a flow card. That should be able to run the evohome card?

---

<div class="post-metadata">

**Author:** ![DavidH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/davidh/32/46160_2.png) [@DavidH](https://community.homey.app/u/DavidH)\
**Post date:** [November 17, 2021, 7:44am UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926/3 "2021-11-17T07:44:06Z")

</div>

Thanks, that would be a good alternative. I was hoping to run everything in one script though, it’s cleaner 🙂

---

<div class="post-metadata">

**Author:** ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)\
**Post date:** [November 17, 2021, 8:16am UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926/4 "2021-11-17T08:16:59Z")

</div>

Afaik all you need is in that script, there is no need to have a flow. As I understand it the script just inputs the parameters to the EvoHome app in the same way that it would normally handle a flow card.

---

<div class="post-metadata">

**Author:** ![DavidH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/davidh/32/46160_2.png) [@DavidH](https://community.homey.app/u/DavidH)\
**Post date:** [November 17, 2021, 11:28am UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926/5 "2021-11-17T11:28:26Z")

</div>

Oh, I didn’t notice that at all! I though the ‘run flowcard’ script did just that, simply call an (existing/regularly made in the Homey interface) flow-card from Homeyscript. This changes things, I’ll have to look in to how to send the correct arguments. thanks!

---

<div class="post-metadata">

**Author:** ![DavidH](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/davidh/32/46160_2.png) [@DavidH](https://community.homey.app/u/DavidH)\
**Post date:** [November 18, 2021, 2:03pm UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926/6 "2021-11-18T14:03:47Z")

</div>

Just in case others run into the samen problem, what @Edwin_D said works! the run\_flowcard method can be used: the easy way is to go to [your own API playground](https://tools.developer.homey.app/tools/api-playground), and run `Homey.flow.getFlows();`. Find your flow, and take the needed info from there.

For the current EvoHome version, the code is as follows: (just change the device\_id 123456 to your device of course)

To set a continuous temperature:

```auto
await Homey.flow.runFlowCardAction({
  uri: 'homey:device:123456',
  id: 'target_temperature_set',
  args: {
    'target_temperature': 20,
  }
});

```

To set a temperature for a few hours:

```auto
await Homey.flow.runFlowCardAction({
  uri: 'homey:device:123456',
  id: 'set_temperature_temporary',
  args: {
    'temp_manual': 19,
    'temp_hours': 2,
  }
});

```

And to cancel your setting and return to the normal program:

```auto
await Homey.flow.runFlowCardAction({
  uri: 'homey:device:123456',
  id: 'reset_temperature',
});

```

Hope this helps somebody.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [November 19, 2021, 5:37am UTC](https://community.homey.app/t/homeyscript-for-evohome-temporary-temperature/54926/7 "2021-11-19T05:37:59Z")

</div>

It’s always nice when someone posts back information on their success for others to benefit, thank you.
