core/homeassistant
J. Nick Koston 096e7cceed
Support XML conversion for RESTful sensors (#31809)
* Support XML conversion for RESTful sensors

Many devices continue to use XML for RESTful
APIs.  Interfacing with these APIs requires custom
integrations or command line fork()/exec() overhead
which many of these devices can work with as if
they were JSON using xmltojson via this spec:
https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html

This change implements converting XML output to
JSON via xmltojson so it can work with the existing
rest sensor component.  As the attributes that
usually need to be scraped are deeper in the document
support for passing in a template to find the
JSON attributes that have been added.  JSON APIs that
do not have their attributes at the top level
can also benefit from this change.

* Auto convert xml, change out the template for jsonpath

* Address review items and potentially unexpected normalize behavior with jsonpath

* Revert "Address review items and potentially unexpected normalize behavior with jsonpath"

This reverts commit fe9e179092.

* json_dict[0] turned out to be needed
2020-02-15 21:10:23 -08:00
..
auth Replace cmp option with eq and order (#31423) 2020-02-02 20:28:52 -08:00
components Support XML conversion for RESTful sensors (#31809) 2020-02-15 21:10:23 -08:00
generated Add initial version of Vilfo Router integration (#31177) 2020-02-12 19:11:15 +01:00
helpers Use new custom_serializer (#31871) 2020-02-15 15:36:57 -08:00
scripts Add Safe Mode (#30723) 2020-01-14 13:03:02 -08:00
util Fix typos found by codespell (#31243) 2020-01-31 08:33:00 -08:00
__init__.py
__main__.py Add Safe Mode (#30723) 2020-01-14 13:03:02 -08:00
bootstrap.py Use time.monotonic instead of time.time where appropriate (#31780) 2020-02-13 22:57:07 +01:00
config.py Catch unexpected exceptions when validating config (#31795) 2020-02-13 22:43:07 +01:00
config_entries.py Annotate more async functions correctly (#31802) 2020-02-14 10:00:22 -08:00
const.py Add and use bunch of data size and rate related constants (#31781) 2020-02-13 08:52:57 -08:00
core.py Clean up frontend services and events (#31654) 2020-02-09 19:47:16 -08:00
data_entry_flow.py Fix typos found by codespell (#31243) 2020-01-31 08:33:00 -08:00
exceptions.py
loader.py Spelling: Config(uration) (#31782) 2020-02-13 08:27:00 -08:00
package_constraints.txt Updated frontend to 20200212.0 (#31772) 2020-02-12 14:54:33 -08:00
requirements.py
setup.py print component import error to logfile (#30346) 2020-01-19 22:05:10 -08:00