HomeyScript: Cannot send notification (create_notification silent fail + no Result tag in Flow)

Hi everyone,

I’m using a Homey Pro (latest firmware) and I’m trying to build an “Away check” automation using HomeyScript.

The script itself works perfectly: it detects lights and shutters that are still open and returns a message. However, I’m stuck on how to properly send a notification or use the result in a Flow.

Here is my full script:

const devices = await Homey.devices.getDevices();

let lightsOn = [];
let shuttersOpen = [];

// Time window (18:30 → 07:00)
const startTime = 18 * 60 + 30;
const endTime = 7 * 60;

const now = new Date();
const currentTime = now.getHours() * 60 + now.getMinutes();

let isBalconyAllowedTime;
if (startTime < endTime) {
  isBalconyAllowedTime = currentTime >= startTime && currentTime < endTime;
} else {
  isBalconyAllowedTime = currentTime >= startTime || currentTime < endTime;
}

// Specific shutters
const myShutters = [
  'Πατζουρι ΣΑΛΟΝΙ',
  'Office Roller Shutter',
  'Bedroom Roller Shutter'
];

for (let device of Object.values(devices)) {

  // Lights
  if (device.class === 'light') {
    const name = device.name.toLowerCase();
    const isBalcony = name.includes('μπαλκ') || name.includes('balcony');

    if (isBalcony && isBalconyAllowedTime) continue;

    if (device.capabilitiesObj.onoff?.value === true) {
      lightsOn.push(device.name);
    }
  }

  // Shutters
  if (
    (device.class === 'windowcoverings' || device.class === 'blinds') &&
    myShutters.includes(device.name)
  ) {
    const position = device.capabilitiesObj.windowcoverings_set?.value;

    if (position !== 0) {
      shuttersOpen.push(
        device.name + ' (' + Math.round(position * 100) + '%)'
      );
    }
  }
}

// If everything is OK
if (lightsOn.length === 0 && shuttersOpen.length === 0) {
  return 'OK';
}

// Build message
let message = '⚠️ Away Check\n';

if (lightsOn.length > 0) {
  message += 'Lights: ' + lightsOn.join(', ') + '\n';
}

if (shuttersOpen.length > 0) {
  message += 'Shutters: ' + shuttersOpen.join(', ');
}

return message;


Issues I’m facing:

1. Cannot access script result in Flow

The “Result” tag does not appear in Logic cards, even after running the flow multiple times.

2. Notifications from HomeyScript do not work

I tried:

await Homey.flow.runFlowCardAction({
  uri: "homey:flowcardaction:homey:manager:notifications:create_notification",
  id: "homey:manager:notifications:create_notification",
  args: { text: "Test message" },
});

The script runs successfully (no error), but no notification is sent (silent fail).

3. Other methods also fail

  • push_text → not available

  • Homey.notifications → not available in HomeyScript


My questions:

:backhand_index_pointing_right: What is the correct / supported way to send a push notification from HomeyScript on recent firmware?
:backhand_index_pointing_right: Is create_notification still supposed to work?
:backhand_index_pointing_right: How can I reliably use the script output inside a Flow if the “Result” tag does not show?

Any working example would really help.

Thanks in advance :folded_hands:

Note that this creates a Timeline notification, it doesn’t send a Push notification. Those are 2 different things. To send a push notifications, you can use this:

await Homey.flow.runFlowCardAction({
  uri: "homey:flowcardaction:homey:manager:mobile:push_text",
  id: "homey:manager:mobile:push_text",
  args: { user: { athomId: "[ATHOM_ID]", id: "[HOMEY_USER_ID]" }, text: "Test message" },
});

You can get the Athom account ID at https://tools.developer.homey.app/me, and you can get your Homey user ID at Homey.users.getUserMe(); at Homey Developer Tools

1 Like

OK thanks. works now but how can I extend the notification text size?

What do you mean by extending the size?

I want the notification to include multiple sections (e.g. Lights and Shutters) with line breaks between them. How can I do that?

To include more text in the notification message (like scroll). Is it possible?

What’s the best way to structure or format longer notification messages in HomeyScript (e.g. multiple lines, spacing, readability)?

No, that’s not possible in push notifications. You can’t add multiple lines

1 Like

This sort-of works:

await Homey.flow.runFlowCardAction({
  uri: "homey:flowcardaction:homey:manager:mobile:push_text",
  id: "homey:manager:mobile:push_text",
  args: { user: { athomId: ATHOM_ID, id: USER_ID }, text: `
Test line 1
Test line 2

Test line 3
Test line 4
`},
});

The result:

1 Like