I’m trying to make an automation in NodeRed that calls turn_on on all entities in the same (Home Assistant) Area that the sensor itself that triggers it, is in.
I can’t get this working to get the Area ID, but if I hardcode the id as a string, it works.
This is the JSON expression that I have in the Data field in the “call service” node in my NodeRed flow:
{"area_id":"{{area_id('binary_sensor.office_motion_any')}}"}
The expression alone works in HA when I test it.