Homeyscript for EvoHome - Temporary Temperature

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 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
(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.

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?

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

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.

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!

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, 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:

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

To set a temperature for a few hours:

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:

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

Hope this helps somebody.

4 Likes

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