Hey
I am trying to extract the state of a relay on my Suprema BioEntry W2 using the ‘new’ Biostar 2 API
when running the command
curl -kX POST "https://172.16.0.19/api/doors/status" -H "accept: application/json" -H "bs-session-id: apikeyhere" -H "Content-Type: application/json" -d "{ \"monitoring_permission\": true}"
I get the response:
{"DoorStatusCollection":{"rows":[{"door_id":{"id":"1"},"opened":"false","unlocked":"true","last_open_time":"0","alarm":"0","status":"2048","alarm":"2048"}],"total":"1"},"DeviceResponse":{"rows":[{"id":"544110530","code":"0"}],"result":"true"},"Response":{"code":"0","link":"https:\/\/support.supremainc.com\/en\/support\/home","message":"Success"}}
I have tried with my value template set as a number of things, ending up at:
value_template: '{{ DoorStatusCollection.rows.door_id.1.unlocked == "false" }}'
But it is still not working
Can anybody help me to understand this please?