Commit 35bc37d
Disable xpath escape (#406)
I had a second problem with my "Sunrise Internet Box".
Attempting to read the value of the following xpath failed:
```
Device/IP/Interfaces/Interface[Alias='IP_DATA']/IPv4Addresses/IPv4Address[Alias='IP_DATA_ADDRESS']/IPAddress
```
Instead of the IP address I was looking for, `get_value_by_xpath`
returned a JSON structure with lots of status information in it, but not
the IP address I was looking for. Turns out that url quoting messed
things up.
So I added a new parameter to the `get_value_by_xpath` function:
The following now returns the desired IP address as expected:
```
await client.get_value_by_xpath("Device/IP/Interfaces/Interface[Alias='IP_DATA']/IPv4Addresses/IPv4Address[Alias='IP_DATA_ADDRESS']/IPAddress", { "capability-flags": { "interface": True }}, False)
```
---------
Co-authored-by: Robert Hegner <[email protected]>1 parent a483eac commit 35bc37d
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
| |||
0 commit comments