Commit graph

58 commits

Author SHA1 Message Date
Ville Skyttä
1ce74ba25c
Import util.dt as dt_util in components/[t-z]* (#93763) 2023-05-29 23:00:43 +02:00
Franck Nijhof
fcb612cd6f
Collection of code styling tweaks (#87344) 2023-02-03 23:51:27 +01:00
Marc Mueller
ab76b3ffb3
Update Union typing (3) [Py310] (#86426) 2023-01-23 10:05:56 +01:00
epenet
1af72e3671
Add device class to withings (#84103) 2022-12-16 20:04:07 +01:00
epenet
f5a8ce4aca
Split platform attributes in withings (#84099) 2022-12-16 15:35:03 +01:00
epenet
c51c8f7e8f
Refactor withings constant (#84095)
Split withings constant
2022-12-16 12:30:56 +01:00
epenet
14ee3f1ddc
Move unused function in withings (#84089)
* Remove unused function in withings

* Move to tests

* Remove reference to attribute.platform

* Move WITHINGS_MEASUREMENTS_MAP to tests

* measute_type > measure_type

* One more
2022-12-16 10:50:20 +01:00
Franck Nijhof
d8a15f3dda
Fix Withings authentication to leverage default redirect URI (#79158) 2022-09-27 13:22:52 -04:00
epenet
d8b2563b3d
Use _attr_should_poll in components [u-z] (#77371) 2022-08-26 21:22:27 +02:00
Marc Mueller
1faabb8f40
Add timeouts to requests calls (#76851) 2022-08-19 08:58:18 +02:00
epenet
28a34a1f89
Remove withings from mypy ignore list (#74966) 2022-07-11 19:14:23 +02:00
epenet
ce353460b3
Fix Withings re-authentication flow (#74961) 2022-07-11 14:27:54 +02:00
Allen Porter
39ce25f76d
Add Withings application_credentials platform (#71990)
* Add Withings application_credentials platform

* Update withings auth implementation
2022-05-22 14:30:57 -07:00
Franck Nijhof
69cc6ab5f1
Clean up accessing entity_registry.async_get_registry helper via hass (#72005) 2022-05-17 16:40:45 +02:00
Diego Elio Pettenò
cef5d6054c
withings: don't store the webhook URL in the state. (#69191)
The webhook url should be calculated at startup, not stored in the state
as otherwise a change in network requires re-configuring the integration
from scratch.

This is particularly important as external network configuration might
change when moving HA between networks, and it's not obvious it needs
to be re-added just for this.
2022-04-30 02:21:12 +03:00
Marc Mueller
9b9b553521
Disable no-self-use [pylint] (#70641)
* Disable no-self-use

* Remove disable comments
2022-04-25 07:41:01 -07:00
Nenad Bogojevic
ccd5ada341
Fix withings race condition for access token (#69107) 2022-04-02 20:39:44 -07:00
Nenad Bogojevic
1a878b4024
Use new withings oauth2 refresh token endpoint (#65134) 2022-01-28 08:48:16 -08:00
Marc Mueller
bcb93d95bb
Update typing (4) [u-z] (#63925) 2022-01-11 21:26:45 +01:00
Ville Skyttä
0de95610e3
Use http.HTTPStatus in components/[wxyz]* (#58330) 2021-10-24 17:25:01 +02:00
J. Nick Koston
3b7dce8b95
Index in-progress flows to avoid linear search (#58146)
Co-authored-by: Steven Looman <steven.looman@gmail.com>
2021-10-22 07:19:49 -10:00
Marc Mueller
d51487f82a
Import Callable from collections.abc (3) (#56777) 2021-09-29 16:19:06 +02:00
Ville Skyttä
d8d34fdd3b
Prefer HTTPStatus over int in HA view JSON functions (#56504)
* Prefer HTTPStatus over int in HA view JSON functions

* Update zwave tests to not expect a fixed typo
2021-09-22 21:59:52 +03:00
Marc Mueller
48bada5a18
Update pylint to 2.11.1 (#56364) 2021-09-18 13:52:59 +02:00
Denis Milanović
35ccad7904
Ignore unsupported MeasureType-s from Withings (#55205) 2021-08-25 15:57:07 +02:00
Ville Skyttä
470f2dd73f
Upgrade pyupgrade to 2.21.2, apply its changes (#52987) 2021-07-19 10:46:09 +02:00
Michael
9eecd90afc
Add constructor return type in integrations T-Z (#50899) 2021-05-20 17:00:19 +02:00
mariwing
28a909c463
Requesting data from last seven days (#49485) 2021-04-23 11:16:24 +02:00
J. Nick Koston
6cf57da89f
Use SOURCE_REAUTH constant for starting reauth flows (#48553) 2021-03-31 19:48:32 +02:00
Erik Montnemery
a09c8eecb7
Fix some sensor classes (#48254)
* Fix some sensor classes

* Tweak

* Tweak
2021-03-23 15:56:33 +01:00
Marc Mueller
dcca29ef68
Update typing 14 (#48078) 2021-03-18 15:08:35 +01:00
Ron Heft
bbd98e196b
Fix withings InvalidParamsException (#47975)
* Bump withings_api to 2.3.1 (fixes #47329)

* Fix NotifyAppli calls to be compatible with withings_api 2.3.1

* Fix errors with withings_api 2.2+ using pydantic

* Bump withings_api to 2.3.2
2021-03-16 17:15:22 +01:00
Marc Mueller
16dcbf1467
Update pylint (#47205) 2021-02-28 22:09:01 -10:00
Kendell R
fbffea6b61
Add unit of measurement and icon for sleep score (#45705) 2021-01-29 19:22:44 +01:00
Diederik van den Burger
c31d9bfd3f
Update Withings integration (add sleeps data) (#41504) 2020-10-10 14:41:26 +02:00
springstan
db582bdc1b
Use http status constants more, add HTTP_ACCEPTED and HTTP_BAD_GATEWAY (#39993)
* Use http status codes and add HTTP_BAD_GATEWAY constant

* Address review comments:
 - using constants in tado integration
 - using constant in media_player init.py

* Add and use HTTP_ACCEPTED constant
2020-09-15 20:01:07 +03:00
springstan
d2b1918e9c
Drop UNIT_ prefix for percentage constant (#39383) 2020-09-05 21:09:14 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Robert Van Gorkom
c913d17913
Add bed sensor availability for withings (#37906) 2020-08-02 09:36:14 -05: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
Bram Kragten
9ecaa10e51
Adjust icons for MDI bump (#37730) 2020-07-14 22:17:14 +02:00
Franck Nijhof
53545c984b
Log lines do not end with a full stop (#37527) 2020-07-05 23:04:19 +02:00
Sean Mooney
a882cfafb1
Fix default icon for Withings sleep sensor (#37502)
The icon for Withings sleep sensor was using `mdi:bed` (which is correct for MDI v5.0.45 and later). However Home Assistant still uses an older version of Material Design Icons (4.9.95), so this `mdi:bed` icon was not displaying at all.  It should be`mdi:hotel` instead, which you can see here: https://cdn.materialdesignicons.com/4.9.95/
2020-07-05 11:28:05 +02:00
Robert Van Gorkom
a7cf76491b
Fix withings bug that grabbed oldest value instead of the newest (#37362)
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-07-02 13:09:49 -07:00
Robert Van Gorkom
2538cda9d4
Fix withings body hydration unit of measure to match documented unit of measure. (#36723) 2020-06-22 18:45:05 -07:00
Robert Van Gorkom
a6a6a7b69c
Add Withings webhooks (#34447)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-06-16 20:16:18 +02:00
Robert Van Gorkom
fcef259021
Prefer use cloud url for oauth2 for Withings (#36348) 2020-06-03 12:40:46 +02:00
Franck Nijhof
7653dc947a
Enable pylint unnecessary-pass (#33650)
* Enable pylint unnecessary-pass

* Process review suggestions

* Fix smhi tests
2020-04-05 10:33:07 +02:00
Franck Nijhof
e8a0abd107
String formatting improvements (#33635)
* String formatting improvements

* Found another one
2020-04-04 18:21:14 +02:00
Robert Van Gorkom
08af989658 Fixing timezone issue which caused wrong selection of data to be used. (#30011) 2019-12-28 21:25:37 +01:00