home-assistant-ecosystem / python-netdata

Python API for interacting with Netdata (https://my-netdata.io).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_ALARMS_ENDPOINT should also decode json response

jurgenhaas opened this issue · comments

The other two endpoints to json decode the netdata response but the alarms are retrieved as text only. This should be changed to do the same thing, i.e. changing data = await response.text() into data = await response.json()

I'm happy to submit a PR but I'm not sure how you would like to handle the fact that this breaks backward compatibility. Please advise.

Looks like a bug. Yes, that should be fixed.