I’m trying to extract the current activity of my Harmony hub, from HA-BRIDGE into a sensor using the RESTful sensor combined with the value_template option, using value_json.
However it seems I can’t quite stumble upon the correct format to extract the JSON, I’ve tried various combinations (bad practice but I can’t share those combinations as I haven’t been saving them) - wondering if anyone can assist me with the correct template/jinja values?
I want to get the first “PowerOff” from activity:label.
I had tried value_json.activity[0] and other combinations like value_jason.activity.label[0] and had ended up thinking I was completely on the wrong track. Appreciate your help.
Partly just because I never did use it - I set up Maddox’s harmony-api for that purpose before the component was released.
Partly a design decision for my home - I don’t want to have to restart HomeAssistant every time I expose a device to the Echo, so am working towards replacing emulated_hue with ha-bridge. And I’d rather have one component managing all that, with the status synced into HomeAssistant (this is just personal preference).
And finally, the main reason which I’m sure most people here can relate to… I feel like tinkering haha
Probably, but I think you would need a template trigger to do that, and it is beyond my Yaml capabilities. I suggest you start a new topic for that question.
I am trying to connect my surveillance Camera with my HA. I so far managed to use a RESTful Sensor that fetches the state of the camera. and for that I send the following GET command:
platform: rest
resource: http://myInstarIPCameraAddress/cgi-bin/hi3510/param.cgi?cmd=getioattr
name: Camera
And as expected and also detailed in the camera CGI commands documentation, it returns the following, exactly in this format:
var io_enable="0";
var io_flag="1";
when I simulate the command in an API tester, it returns the same and that the Content-Type is text/html.
Where I am blocked is how to extract the 0 or 1 value and put it in a usable sensor in HA.