I need a beter description for the property: Create Flowcards.
What it does:
It makes the fields ShowAs the real deal.
So if you select OnOff and set Create FlowCads to true, the AVD will get a real OnOff property, which is recoqniced by Homey and other Apps as a device having a real OnOff button.
This is why you also get Flowcards.
(Only one type ShowAs with Create Flowcards can exists, a Device can only have one real OnOff button, or one real Dim)
I did indeed do that last time, but really didn’t come up in google. I started all over again now, and it does come up now. Very strange maybe I saved a different class the first time so it doesn’t change and therefore doesn’t come up in google as well? In any case thank you very much for your thoughts
I thought about:
“Create real capability + Flowcards” with an explanation like
“Only 1 per type allowed (like OnOff/YesNo/Thermostat); But, virtual capabilities may use unlimited equal capabilities”
There is an Set [expression] card, which allows for javascripts calculations to be used.
Use can set functions to be used in the App Settings–> Functions.
But for this we first add a function in App settings.
We go to the bottom, fill in average and press add function:
Then we scroll down and press on edit, and fill in the function:
function () {
var sum = 0.00;
for( var i = 0; i < arguments.length; i++ ){
sum += parseFloat( arguments[i], 10 );
}
return sum/arguments.length;
}
Please note that you don’t give the function a name in the codefield, but in the namefield.
No we go back to the flow for the curtains.
For this we use a Set field to Expression card:
And here we use the average function from the App Settings.
All the number tags arenot from the flowcards (because only one trigger triggers the flow), but the tags from the curtain-devices.
And once again, tada! We can now close all curtains in the Living room with one button, next to the tv button
I actually have a question about the ‘watch’ function. In fact, I created the flow below to test it. But I get the same response every time. Even though I ask via google to turn on the lamp or via the flow. Am I doing something wrong?
By any change, have you created the AVD or field, then the flow with the watch in it, and then enabled create Insights for this field?
If so, i found a bug that it would not refresh the insight reference if the watch was put in place (the first time) before the insights where created by the AVD. This is resolved now in develop.
For all normal devices, i have found no issues.
So, please, let me know if it was an AVD, and if so, update to the new version and check again?
(You could also just restart the app and then it already should work because the watches are reloaded).
In AVD Settings, Create Insights is hidden for buttons that cannot have insights.
That are all pushbuttons (not On/Off) that you can only push (also buttons like Speaker Next f.i.).
There is one exception , the Pushbutton and separate indicator. This is the only know (virtual) pushbutton in Homey that can have insights who pushed it!
Improved sorting of ShowAs of Buttons.
Added Homey icon (old one i guess now) to the default icons (category Devices).
Thanks @RonnyW!
During import, all old devices will show lists of compatible devices on your new homey.
You can then select the device on your new homey, which would have the same name i guess.
After that a script is created to recreate all your flows (including variables and stuff like that).
Also, internal references to flows itself are already correctly by TFE.
And many apps are supported by it.
Personally i already use it a lott to copy/paste complex flows which are the same for all (bed)rooms but with different devices, changing it during import.
Now, currently, it only supports advanced flows, but i’ll change that so it will include normal flows (which is almost done already).
Also, recreation of flow-folders will be included, as will other requirements needed to copy the complete flows from an older Homey to a newer Homey, like beeing able to copy/paste your own flows including HomeyScript codes in there original cards.
I’m serching an easy possibility to create a mode-like capability. I know modes are only predefined and not possible as virtual device. So I made a device with am “main” on/off switch and 3 mode switches:
The example shows a heating mode devide. The main device is: heating on/off.
The other switches are: at home, away, at work.
I change the heating plan depending on the selected switch.
Currently I act with flows on a switch going on and then I switch all other states off, so only one is active.
It’s a bit ugly, but I have no other Idea so solve this in a better way. Has anyone a better solution?
No, sorry, what I means was: If there is a backup-restore option that can help me move to a newer Homey model, then why do I need flow exchange? I mean it’s great for copying devices for myself and for others, so I do see the value, just not for the scenario of replacing a Homey device itself.