Skip to content

provide human-readable display name to custom event commands for automation

Kyle Harding requested to merge klutchell/Shinobi:event_monitor_name into dev

It's helpful for automation (at least in my use case) to have the human-readable display name available to custom trigger commands.

I tested this with the latest master branch and the string substitution works as expected.

# Command on Trigger
echo '{"state": "on", "attributes": {"device_class":"motion","friendly_name":"{{MONITOR_NAME}} monitor motion","time":"{{TIME}}","region_name":"{{REGION_NAME}}","monitor_id":"{{MONITOR_ID}}","group_key":"{{GROUP_KEY}}","confidence":"{{CONFIDENCE}}","reason":"{{REASON}}"}}' > /tmp/{{MONITOR_ID}}.motion
{"state": "off", "attributes": {"device_class":"motion","friendly_name":"Basement monitor motion","time":"2020-03-05T10:18:42-05:00","region_name":"FULL_FRAME","monitor_id":"4ujWgcwqdL","group_key":"cnjfnUpuoX","confidence":"94","reason":"motion"}}
Edited by Moe

Merge request reports