Automation Triggers - Allow Durations for ZHA Device Offline Trigger

Automation triggers for ZHA device offline do not allow for a duration to be specified as in many other triggers. For instance, adding the below YAML for a device offline trigger in an automation results in the error “Message malformed: extra keys not allowed @ data[‘for’]”. Using the “for” and corresponding “hours”, “minutes” and “seconds” attributes works with other triggers.

device_id: 272730ea844cc878ce7b33116d64400d
domain: zha
platform: device
type: device_offline
subtype: device_offline
id: Dining Room Door
for:
  hours: 0
  minutes: 15
  seconds: 0

Use an “unavailable” state trigger instead.

Edit: sorry, didn’t see this was under feature requests and not a general query.

Hi @jerrm. Yep, just a feature request. Thank you for the workaround suggestion, though. That would certainly work.

1 Like