Commit Graph

193 Commits (cc18b9a2d8b7075d4003e95614f6994d4f60c7e6)

Author SHA1 Message Date
SNoof85 d0a1a6cba5
Update strings.json (#41051) 2020-10-03 14:11:25 +02:00
HomeAssistant Azure 07d5af1969 [ci skip] Translation update 2020-09-08 00:04:13 +00:00
HomeAssistant Azure 5ce62c8446 [ci skip] Translation update 2020-09-02 00:03:29 +00:00
J. Nick Koston 0f5733ac59
Update cert_expiry to use CoordinatorEntity (#39397) 2020-08-30 14:41:18 +02:00
Ville Skyttä b4bac0f7a0
Exception chaining and wrapping improvements (#39320)
* Remove unnecessary exception re-wraps

* Preserve exception chains on re-raise

We slap "from cause" to almost all possible cases here. In some cases it
could conceivably be better to do "from None" if we really want to hide
the cause. However those should be in the minority, and "from cause"
should be an improvement over the corresponding raise without a "from"
in all cases anyway.

The only case where we raise from None here is in plex, where the
exception for an original invalid SSL cert is not the root cause for
failure to validate a newly fetched one.

Follow local convention on exception variable names if there is a
consistent one, otherwise `err` to match with majority of codebase.

* Fix mistaken re-wrap in homematicip_cloud/hap.py

Missed the difference between HmipConnectionError and
HmipcConnectionError.

* Do not hide original error on plex new cert validation error

Original is not the cause for the new one, but showing old in the
traceback is useful nevertheless.
2020-08-28 13:50:32 +02:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
HomeAssistant Azure 195d4b6897 [ci skip] Translation update 2020-08-27 00:04:55 +00:00
Ville Skyttä c2a21fa496
Update coordinator improvements (#38366)
* Make generic

* Add type info to bunch of uses

* Recognize requests exceptions

* Recognize urllib exceptions
2020-07-30 18:04:00 +03:00
HomeAssistant Azure 8abdc2c969 [ci skip] Translation update 2020-07-27 00:02:58 +00:00
HomeAssistant Azure 9092b83869 [ci skip] Translation update 2020-07-20 00:03:01 +00:00
HomeAssistant Azure 2e72216a1c [ci skip] Translation update 2020-07-11 00:02:51 +00:00
HomeAssistant Azure 251a1d6619 [ci skip] Translation update 2020-07-09 00:05:04 +00:00
HomeAssistant Azure e48bcd2070 [ci skip] Translation update 2020-06-27 00:05:54 +00:00
jjlawren e92e26b73a
Add expiration timestamp to cert_expiry sensors (#36399)
* Add expiration timestamp to cert_expiry sensors

* Clear timestamp if cert becomes invalid

* Use timezone-aware timestamps

* Use DataUpdateCoordinator, split timestamp to separate sensor

* Use UTC, simpler add/remove handling

* Review fixes

* Fix incomplete mock that fails in 3.8

* Use static timestamps, improve helper method name
2020-06-18 18:29:46 +02:00
HomeAssistant Azure b15caf31a9 [ci skip] Translation update 2020-06-15 00:03:32 +00:00
HomeAssistant Azure 4412ce3b86 [ci skip] Translation update 2020-06-13 00:03:58 +00:00
HomeAssistant Azure 81355a0e23 [ci skip] Translation update 2020-06-08 00:02:43 +00:00
HomeAssistant Azure 3bf389639b [ci skip] Translation update 2020-06-07 00:03:28 +00:00
HomeAssistant Azure 492874c4a0 [ci skip] Translation update 2020-06-06 00:03:33 +00:00
HomeAssistant Azure 973f66a974 [ci skip] Translation update 2020-05-22 00:05:00 +00:00
HomeAssistant Azure c10aa13d0b [ci skip] Translation update 2020-05-20 00:03:49 +00:00
HomeAssistant Azure e94f44f294 [ci skip] Translation update 2020-05-17 00:02:56 +00:00
HomeAssistant Azure 9586e9ebef [ci skip] Translation update 2020-05-15 00:02:56 +00:00
Paulus Schoutsen 0efeefe3b2 Update translations 2020-05-13 11:27:21 -07:00
Paulus Schoutsen dd32324e01
Use config flow references for data (#35529) 2020-05-12 10:50:44 -07:00
HomeAssistant Azure 78f846d532 [ci skip] Translation update 2020-05-03 00:02:26 +00:00
HomeAssistant Azure f4f2aff5b6 [ci skip] Translation update 2020-05-02 00:04:57 +00:00
HomeAssistant Azure bd72ddda3c [ci skip] Translation update 2020-05-01 00:02:55 +00:00
jjlawren 813e945d86
Remove deprecated cert_expiry config (#34628) 2020-04-24 09:46:07 +02:00
Joakim Sørensen 730a257f3c
Rename translations dir for integrations (#34494) 2020-04-21 16:11:05 -07:00
Paulus Schoutsen f06aeea385 Update translations 2020-04-15 09:51:07 -07:00
Paulus Schoutsen d36204a968
Move title translation to root (#33850) 2020-04-15 09:41:18 -07:00
HomeAssistant Azure ad619817c6 [ci skip] Translation update 2020-04-08 00:08:19 +00:00
Franck Nijhof 39336d3ea3
Add prettier (in pre-commit and CI) (#33693)
* Add prettier (in pre-commit and CI)

* Make all file prettier

* Change order

* Add to Azure Pipelines

* Fix a YAML file prettier caught as invalid

* Remove flow mapping using curly braces from all YAML service files
2020-04-05 17:27:16 +02:00
HomeAssistant Azure 8a8ee95336 [ci skip] Translation update 2020-04-04 00:07:23 +00:00
Paulus Schoutsen f1d3c0d19b
Remove unused manifest fields (#33595) 2020-04-03 12:58:19 -07:00
HomeAssistant Azure 763ed0dc7b [ci skip] Translation update 2020-03-24 13:18:47 +00:00
HomeAssistant Azure 104350265d [ci skip] Translation update 2020-03-04 18:13:24 +00:00
jjlawren df3f7687d4
Refactor Certificate Expiry Sensor (#32066)
* Cert Expiry refactor

* Unused parameter

* Reduce delay

* Deprecate 'name' config

* Use config entry unique_id

* Fix logic bugs found with tests

* Rewrite tests to use config flow core interfaces, validate created sensors

* Update strings

* Minor consistency fix

* Review fixes, complete test coverage

* Move error handling to helper

* Subclass exceptions

* Better tests

* Use first object reference

* Fix docstring
2020-03-02 07:44:24 -06:00
springstan a85808e325
Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
HomeAssistant Azure 40e866a5bb [ci skip] Translation update 2020-02-13 00:31:46 +00:00
HomeAssistant Azure a2bea2cab8 [ci skip] Translation update 2020-02-09 00:31:39 +00:00
HomeAssistant Azure 274cf23269 [ci skip] Translation update 2020-02-07 00:31:50 +00:00
Christian Clauss df7d2b3aeb
Fix typos found by codespell (#31243)
* Fix typos found by codespell

* Fix typos found by codespell

* codespell: Furture  ==> Future

* Update test_config_flow.py

* Update __init__.py

* Spellcheck: successfull  ==> successful

* Codespell: unsuccesful  ==> unsuccessful

* Codespell: cant  ==> can't

* Codespell: firware ==> firmware

* Codespell: mimick  ==> mimic
2020-01-31 08:33:00 -08:00
HomeAssistant Azure 0534153ae7 [ci skip] Translation update 2020-01-13 00:31:54 +00:00
HomeAssistant Azure d6512c8a9f [ci skip] Translation update 2020-01-11 00:31:55 +00:00
Franck Nijhof 345cc244ed
Correct names in manifests (C-L) (#30532) 2020-01-07 08:19:17 +01:00
Franck Nijhof a84741392b
Format all manifests with prettier (#30521) 2020-01-06 21:28:23 +01:00
HomeAssistant Azure d1ed67f44a [ci skip] Translation update 2020-01-06 00:32:11 +00:00
HomeAssistant Azure 13116d8d3f [ci skip] Translation update 2019-12-30 00:32:19 +00:00
Bas Nijholt cce3077df3 Sort imports according to PEP8 for cert_expiry (#29705) 2019-12-08 23:32:50 +01:00
HomeAssistant Azure d2d9f09f13 [ci skip] Translation update 2019-11-13 00:32:12 +00:00
HomeAssistant Azure f71527d5db [ci skip] Translation update 2019-11-03 00:31:44 +00:00
HomeAssistant Azure 4863face69 [ci skip] Translation update 2019-11-02 00:31:48 +00:00
HomeAssistant Azure 0e4331e922 [ci skip] Translation update 2019-10-29 00:32:16 +00:00
HomeAssistant Azure 72dee7dd21 [ci skip] Translation update 2019-10-28 00:32:16 +00:00
HomeAssistant Azure 868f88a4e0 [ci skip] Translation update 2019-10-27 00:32:10 +00:00
HomeAssistant Azure 7096826d1d [ci skip] Translation update 2019-10-26 00:32:20 +00:00
HomeAssistant Azure 95295791bd [ci skip] Translation update 2019-10-25 00:32:15 +00:00
HomeAssistant Azure 8c31afc31e [ci skip] Translation update 2019-10-24 00:32:18 +00:00
Paulus Schoutsen 23289459ca Update translations 2019-10-23 13:36:38 -07:00
jjlawren 44bf9e9ddc Additional SSL validation checks for cert_expiry (#28047)
* Additional SSL validation checks

* Add validity attribute, log errors on import

* Don't log from sensor
2019-10-22 23:34:12 -07:00
HomeAssistant Azure 2cc039dbc4 [ci skip] Translation update 2019-10-22 00:32:10 +00:00
Quentame ac467d0b3f Not slugify cert_expiry name (#28055) 2019-10-21 14:30:49 +02:00
Quentame 5ce437dc30 Fixing config_entries.async_forward_entry_unload calls (step 1) (#27857) 2019-10-20 12:15:46 +02:00
HomeAssistant Azure d8e3255603 [ci skip] Translation update 2019-10-15 00:31:44 +00:00
Ville Skyttä 761d7f21e9 Upgrade pylint (#27279)
* Upgrade pylint to 2.4.2 and astroid to 2.3.1

https://pylint.readthedocs.io/en/latest/whatsnew/2.4.html
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-1
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-2

* unnecessary-comprehension fixes

* invalid-name fixes

* self-assigning-variable fixes

* Re-enable not-an-iterable

* used-before-assignment fix

* invalid-overridden-method fixes

* undefined-variable __class__ workarounds

https://github.com/PyCQA/pylint/issues/3090

* no-member false positive disabling

* Remove some no longer needed disables

* using-constant-test fix

* Disable import-outside-toplevel for now

* Disable some apparent no-value-for-parameter false positives

* invalid-overridden-method false positive disables

https://github.com/PyCQA/pylint/issues/3150

* Fix unintentional Entity.force_update override in AfterShipSensor
2019-10-07 08:17:39 -07:00
HomeAssistant Azure 2c6a869bc6 [ci skip] Translation update 2019-10-06 00:32:15 +00:00
jjlawren adab228012 Unload cert_expiry config entries (#27150)
* Allow cert_expiry unloading

* Update codeowners
2019-10-03 16:50:15 -07:00
jjlawren bb45bdd8dd Fix update on cert_expiry startup (#27137)
* Don't force extra update on startup

* Skip on entity add instead

* Conditional update based on HA state

* Only force entity state update when postponed

* Clean up state updating

* Delay YAML import
2019-10-03 17:39:14 +02:00
jjlawren 2307cac942 Add unique_id to cert_expiry (#27140)
* Add unique_id to cert_expiry

* Simplify ID
2019-10-03 14:26:19 +02:00
HomeAssistant Azure e005f6f23a [ci skip] Translation update 2019-10-03 00:34:28 +00:00
Franck Nijhof c7da781efc Update documentation link URL for integrations in all manifests (#27114) 2019-10-02 09:25:44 -07:00
HomeAssistant Azure 513d2652e4 [ci skip] Translation update 2019-10-01 00:32:19 +00:00
HomeAssistant Azure cdb469f711 [ci skip] Translation update 2019-09-30 00:32:17 +00:00
HomeAssistant Azure ba92d781b4 [ci skip] Translation update 2019-09-26 00:32:13 +00:00
HomeAssistant Azure 24cbae6ec3 [ci skip] Translation update 2019-09-21 00:32:16 +00:00
HomeAssistant Azure fccbaf3805 [ci skip] Translation update 2019-09-19 00:32:15 +00:00
HomeAssistant Azure a390cf7c6a [ci skip] Translation update 2019-09-18 00:32:12 +00:00
Maikel Punie 9114ed36cd Fix cert expiry config flow check and update (#26638)
* Fix typo in translations

* Work on bug #26619

* readd the homeassistant.start event

* Remove the callback

* Added the executor_job for _test_connection

* Update test_config_flow.py
2019-09-17 13:39:46 -07:00
HomeAssistant Azure 771c674e90 [ci skip] Translation update 2019-09-17 00:32:14 +00:00
HomeAssistant Azure 6a9ecf0015 [ci skip] Translation update 2019-09-14 00:32:15 +00:00
SNoof85 7e7ec498ca Fix Typo (#26612) 2019-09-13 07:33:14 +02:00
HomeAssistant Azure 10f742d552 [ci skip] Translation update 2019-09-13 00:33:08 +00:00
HomeAssistant Azure 0b1f389c76 [ci skip] Translation update 2019-09-07 00:32:45 +00:00
HomeAssistant Azure 1cbb895d20 [ci skip] Translation update 2019-09-05 10:11:41 +00:00
Paulus Schoutsen 385a496944 Update translations 2019-09-01 22:30:09 -07:00
Maikel Punie 33bd9c83fb Enable cert_expiry config entries (#25624)
* Enable cert_expiry config entries

* add black

* lint fixes

* Rerun black

* Black on json files is a bad idea

* Work on comments

* Forgot the lint

* More comment work

* Correctly set defaults

* More comments

* Add codeowner

* Fix black

* More comments implemented

* Removed the catch

* Add helper.py from cert_expiry to .coveragerc
2019-08-28 19:35:09 +02:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
Joakim Plate c2f1c4b981 Correct socket use in cert_expiry platform (#25011)
* Make sure we use same family for ssl socket and connection

getaddrinfo result could be different from what connection
was made with. It also blocks potential use of
happy eye balls algorithm

This also fixes lingering sockets until python garbage
collection.

* Add availability value if unable to get expiry

* Fix lint issue
2019-07-08 11:33:23 +02: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
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