Hey Martijn,
Using the webapi playground, nothing happend. Using the method as described, it works.
I can not explain and will look soon again to webapi playground again, but for the moment glad that I could fix it my way.
Apparently somehow HS indeed has some new permissions, because the scripts never worked with HS. I’ve to admit I tested it once when the script was just published back in '22.
“Meten is weten” (a Dutch saying): I just tested with a Homeyscript and it managed to replace a device in standard+adv. flows.
Note: the other script, fix-flows-by-name.js also works @ Homeyscript.
Note 2:
Both scripts still work fine @ Web API Playground…
.
@sschot Steven, the reason why you didn’t see anything @ Playground:
When running the script with the softRun option set to true: you have to open the browser’s console to view the script logs;
Otherwise nothing happens onscreen, except “Request took xxxms”
It’s mentioned right below the true/false setting: // Open the console in your browser and the result will be shown there // Howto open console: https://balsamiq.com/support/faqs/browserconsole/
Maybe run it using Playground and share screenshot from developer console from the Browser - eg. those showing some errors, that would also understand this better.
I can confirm that it works in the Homey script. I created the script, entered the device ID or name, set it to false, saved it, and when you run the test within the script, it changes the flows where this device is connected. No need to do anything else.
Nice work .
This looks exactly what i want but i can´t seem to get it to work. I first tried with my heatpump to no avail, so now I´m experimenting with two virtual devices, that wouldn´t make a difference right? (They are same type and functions).
Collected the ID´s of the respective unit and pasted the “raw” version of the script from github. When running softRun = true i get no errors and it shows the simple flow it´s going to change but when changing to false, i get errors. Not sure what to do now, hope someone can help
Ah, ok. Will try to search for other options. Now i saw …FIX (advanced) flows… on the headline. Does this only fix advanced flows? Those i tried were simple flows
Hi @martijnpoppen, yesterday I used your script for the first time. It worked great (after switching softRun from true to false… ) and it’s so much helpful! Thank you very much!