Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uri on new homey pro undefined #49

Open
Kenyre opened this issue Jun 8, 2023 · 2 comments
Open

Uri on new homey pro undefined #49

Kenyre opened this issue Jun 8, 2023 · 2 comments

Comments

@Kenyre
Copy link

Kenyre commented Jun 8, 2023

The following piece of code:

const conditionCards = await Homey.flow.getFlowCardConditions();
for( const card of conditionCards ) {
  console.log(card.uri, card.id)
}

prints undefined for the uri all flow cards (both and + then cards):

undefined homey:manager:flow:is_enabled
undefined homey:manager:mobile:push_confirm
undefined homey:manager:logic:equal
undefined homey:manager:logic:equal_boolean
undefined homey:manager:alarms:is_enabled
undefined homey:manager:cron:time_between
undefined homey:manager:logic:contains
undefined homey:manager:cron:date_equals
undefined homey:manager:logic:lt
undefined homey:manager:cron:date_between
undefined homey:manager:logic:gt
undefined homey:manager:cron:day_month_equals
undefined homey:manager:logic:random
undefined homey:manager:cron:day_equals
undefined homey:manager:logic:equation

Which in turn also seems to affect running the flowcards, as the default example-flowcard-run.js prints:

———————————————————
❌ Script Error
⚠️ Not Found: FlowCardCondition with ID day_equals: Not Found: FlowCardCondition with ID day_equals
    at /app/node_modules/athom-api/dist/index.js:1:1247257
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Apologies if this is because it is still early access and not compatible yet

@runely
Copy link

runely commented Nov 5, 2023

I also bumped into this one today.

Was trying out a new script on my Homey 2019 (degraded to developer Homey) and when it was working i copied the script to my Homey Pro 2023. But runFlowCardAction didn't work as it did on HP19 because the uri of the action flow card (actually all flow cards) are empty and runFlowCardAction requires uri to work...

@runely
Copy link

runely commented Nov 5, 2023

It turns out that uri shows as undefined when returned from a getFlowCardAction on HP23, but using uri in a runFlowCardAction still works. One thing to note is that it seems that id on HP19 is the id of the flow card, but on HP23 the id is the combination of uri and id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants