Hi Everyone,
I hoping someone could point me in the right direction on this! I’ve been able to pass information on the device from automations that use slack and others when I use {{ trigger.to_state.attributes.friendly_name }} and it works great. However, what I try send the same variable via a rest command, I get this error in the log -
How can I send both sensor value and name via the rest API since they are appear to be ignored.
Sample Configs:
Automation:
alias: alarm_feed
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.g4_dome_vehicle_detected
- binary_sensor.g4_dome_person_detected
- binary_sensor.g4_instant_person_detected
condition: []
action:
- service: rest_command.alarm_feed
data: {}
mode: single
Rest Config
rest_command:
sanasight_alarm_feed:
url: https://incident.test.com/ha_receiver/receive
method: post
headers:
content-type: 'application/json'
payload: '{"event_time": "date", "XXX-DATETIME-VAR-XXX????": "{{ trigger.to_state.attributes.friendly_name }}"}'
verify_ssl: true