Write to Timeline from Homey Script

Hi,
How can I write to the timeline from within a script?

I have the same question. Have you found a resolution?

I found this, which worked for me.

await Homey.flow.runFlowCardAction({
uri: ‘homey:manager:notifications’,
id: ‘create_notification’,
args: {
text: ‘some text ’ + someVariable + ’ some more text’
},
});

1 Like

This worked for me:

await Homey.flow.runFlowCardAction({
uri: “homey:manager:notifications”,
id: “create_notification”,
args: {
text: “some text” },
});

dont use quotes (’ ') but (" ")

To make it work for me (too debug), I neede it to change to:

await Homey.flow.runFlowCardAction({
uri: ‘homey:flowcardaction:homey:manager:notifications:create_notification’,
id: ‘homey:manager:notifications:create_notification’,
args: {text: 'Step 2a '},
});

1 Like

For some reason, needed to change url to be with " and not with ’ - then works as a charm

// My timeline test
result = await Homey.flow.runFlowCardAction({
uri: “homey:flowcardaction:homey:manager:notifications:create_notification”,
id: “homey:manager:notifications:create_notification”,
args: {text: ‘HomeyScript write test’},
});
console.log(result)
return

This is because (all) the posted code parts in this topic aren’t formatted as code, like this: first and last line start with 3 backticks:
```
Your code here
```

Fancy quotes and fancy double quotes are invalid.

Code formatted as code should look like this:

await Homey.flow.runFlowCardAction(
  {
    uri: 'homey:flowcardaction:homey:manager:notifications:create_notification',
    id: 'homey:manager:notifications:create_notification',
    args: {text: 'Step 2a'},
  }
);

(Note the ‘copy’ icon at the top-right, for easy and error-free copying)

1 Like