[FIXED] HomeyScript: a renamed script is still presented with its previous name in drop-down menus?

Hi all,

HomeyScript scripts can be renamed, but the ‘old’ name keeps popping up anywhere else, when you want to select the script, like in a flow.
I guess it’s not my Homey Pro only?

  • Renamed script

Screenshot from 2022-06-09 21-03-07

  • Flow

Screenshot from 2022-06-09 21-01-26

Unfortunately arguments are not a typical database relation to anything system wide. They are just saved as an id with whatever the name was on saving(argument autocomplete for app devs). Apps can never know when their saved arguments get updated with a new name since it only has an id to work with. They could actively monitor all Flows with the web api but this still leaves them unable to update argument names since apps cant update Flows so they can only warn that a name is out of sync. The same applies to deletion.

I’m don’t think calling this a bug applies here because it’s just a implementation choice.

Thanks for looking into this, Jero. I’ve changed the topic title.
Now I don’t get why Athom introduced the possibility to rename scripts.
Screenshot from 2022-06-10 01-42-16

I know apps can’t update flows, but when I rename a flow or variable, the new name gets presented when I want to pick that flow or variable from a drop-down.
As you can see in the second screenshot, the changed Homeyscript name ConvertSec-2-HHMMSS isn’t presented in the drop-down.

~Peter

You are right this is indeed a bug com.athom.homeyscript/app.js at 9c528865ebcef7d00359b432c5834750230d7a44 · athombv/com.athom.homeyscript · GitHub this method still returns the id as the name. I will look into it :wink:

1 Like

Thanks for the quick fix, Jeroen!
Fixed in v3.3.1