Commit Graph

28 Commits (127c9fc8770d31de04101339813ed8d09a1a8dd4)

Author SHA1 Message Date
J. Nick Koston 14869483ca
Fix scrape sensor auth with httpx (#49806) 2021-04-28 11:24:11 +02:00
Franck Nijhof 055cdc64c0
Add support for IoT class in manifest (#46935) 2021-04-15 10:21:38 +02:00
Erik Montnemery 64bc9a8196
Migrate integrations r-s to extend SensorEntity (#48215) 2021-03-22 19:54:14 +01:00
Fabian Affolter f1c24939f3
Upgrade beautifulsoup4 to 4.9.3 (#45619) 2021-01-28 12:06:36 +01:00
J. Nick Koston dd0afc3b66
Create httpx helper to wrap a shared httpx.AsyncClient (#43877)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-12-09 17:18:57 +01:00
Moritz Schmitz von Hülst 434d39a5ea
Add initial rest query params (#42198)
* add initial rest query params

* of course I didn't run black

* fix tests

* fix tests

* add test

* reformat

* add binary sensor test

* fix tests

* add one more test and fix switch

* should not have touched that

* if you don't pay attention once
2020-11-11 09:03:55 -10:00
J. Nick Koston 183f94364a
Parse html in the executor for scrape sensors (#41987) 2020-10-17 18:57:59 +02:00
J. Nick Koston 5580b21260
Decouple RestData from rest.sensor (#41980) 2020-10-17 04:56:45 +02:00
J. Nick Koston ad6ce5fa83
Convert rest sensors to async using httpx (#41973) 2020-10-16 19:21:13 -05:00
Fabian Affolter 41ba1dff71
Upgrade beautifulsoup4 to 4.9.1 (#39158) 2020-08-22 14:48:25 -04:00
Ryan 59063a7d61
Add scrape sensor name to logs (#38020) 2020-07-20 23:07:36 +02:00
David Beitey 7a73c6adf7
scrape: extract strings from new non-text tags (#35021)
With the upgrade to beautifulsoup4 to 4.9.0 (#34007), certain tags
(`<style>`, `<script>` and `<template>`) are no longer treated as having
text content (see
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#comments-and-other-special-strings
and reported bug https://bugs.launchpad.net/beautifulsoup/+bug/1868861)
meaning the content of these types of tags became inaccessible to HA.

Where the previous code could access `.text` on the tag, bs4 4.9 now
yields an empty string; these types of tags require accesing `.string`
instead.  This PR checks the tag name (which will aalways be lowercase
given how the parser works;
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#other-parser-problems)
and applies this different access strategy to get the content of the
HTML tag.  All other tags are handled in the original manner.
2020-05-04 10:45:40 +02:00
Fabian Affolter 91e7bcbfac
Upgrade beautifulsoup4 to 4.9.0 (#34007) 2020-04-11 12:56:18 +02:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
Paulus Schoutsen 270758417b
Properly define depenency for Scrape integration on Rest integ… (#32136) 2020-02-24 00:03:33 -08:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
Fabian Affolter 33738cc83a
Upgrade beautifulsoup4 to 4.8.2 (#30274) 2019-12-30 17:51:11 +01:00
Bas Nijholt 23b92b2a56 Sort imports according to PEP8 for components starting with "S" (#29777) 2019-12-09 14:38:01 +01:00
Fabian Affolter 396e68a4b9 Upgrade beautifulsoup4 to 4.8.1 (#27325) 2019-10-08 09:28:37 -07:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
Fabian Affolter b5893a8a6e Upgrade beautifulsoup4 to 4.8.0 (#26006) 2019-08-16 16:16:46 -07:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Robert Dunmire III 003ca655ee Fix errors if rest source becomes unavailable (#24986)
* Fix errors if rest source becomes unavailable

* Remove exclamation mark
2019-07-06 19:33:37 +02:00
cgtobi 2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Paulus Schoutsen cfe4cf30ad
Add manifests (#22699)
* Add manifests

* Update auto name

* Update codeowners

* Add requirements from platforms

* Minor cleanup

* Incorporate changes from awarecan PR
2019-04-03 21:14:45 -07:00
Tobias Sauerwein 048b100eea Clean up docstrings (#22679)
* Clean up docstrings

* Fix long lines

* Fix more docstrings

* Fix more docstrings

* Fix more docstrings
2019-04-03 17:40:03 +02:00
Penny Wood f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00
Paulus Schoutsen f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00