Closed mbierman closed 3 years ago
So it looks like I found the problem. statusPattern
should not be inside the statusUrl
as I had it.
I will leave this open as I think the documentation could be improved. Also, for consideration of the request to support parssing by keynames instead of regex
Describe the bug This is probably more of a documentation question than a bug, but I have an enhancement request as well. I'm having no luck with setting the
statusPattern
. Maybe there could be an additional example in the documentation. I'm hoping that I have everything in the right place etc. and I just don't have the query right.Expected behavior Given the following body response for a
statusUrl
I need like something like the following, If "
target":"home"
or"target":"sleep"
then switch is ON. I imagine that should look like:"statusPattern": "{/.*\"target\".*\"(home|sleep)\".*/}"
To Reproduce Steps to reproduce the behavior:
Version (output of
npm list -g homebridge homebridge-http-switch
)Configuration
My questions:
Additional context So I might be getting ahead of myself because I obviously don't follow how the regex is working here, but it would be amazing if stead of regex the plugin supported query the nodes. in this case, .
node .systemMode
would return exactly the right value to test rather than a RegEx.