11-23-2024 06:18 PM
The Google Home script editor has the type: time.delay for "actions":
https://developers.home.google.com/automations/schema/reference/standard/delay_action
Is there no way to use this option type for "conditions"?
I'm trying to setup a script that notifies if a device is offline but for more than 5min for example. This would prevent the notification from firing during brief disconnections when it reconnects again right after (basically false alarms).
Using the time.delay for "actions" is only useful when you want to set a pause between two or more actions. For a single action, it will still trigger the notification but with a delay which is not useful for this.
If they had this option for "conditions", there would be a way to trigger an action with a pause that verifies the starter state; like being notified when a device is offline for a set amount of time. Kind of like this for example:
metadata:
name: Offline sensor notification
description: Offline alert automation.
automations:
starters:
- type: device.state.Online
state: online
is: false
device: mainDevice - Home
condition:
type: and
conditions:
- type: time.delay
for: 5min
- type: device.state.Online
state: online
is: false
device: mainDevice - Home
actions:
- type: home.command.Notification
title: Device Offline sensor
body: Check the Device online status.
11-27-2024 08:25 PM
Hi @SirBensalot,
Thank you for reaching out and the comprehensive information you've provided. I understand that you want to include conditions instead of timely.delay in Google Home script editor. In this instance, this feature is not available at this moment. Additionally. Consider sharing your thoughts directly with our development team through this feedback. Your input will help us prioritize features and ensure that we're meeting the needs of our diverse user base.
Warm regards,
Jeremy.