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