Commit Graph

28 Commits (8d6925b3ab535c252ebce33f948d46d0c0927572)

Author SHA1 Message Date
Franck Nijhof 15cffbe496
Clean up async_dispatcher_connect helper usage (#68613) 2022-03-24 13:19:11 +01:00
dewdrop dbb2c64d86
Fix broken aftership sensor after pyaftership 21.11.0 bump (#66855)
* Fix update to pyaftership 21.11.0

Variable name collision and a missing property access was causing this sensor to always return zero elements.

* Move subscripting out of awaited statement
2022-02-20 15:33:19 +01:00
Joakim Sørensen b45f3b97c3
Bump pyaftership to 21.11.0 (#64294) 2022-01-17 14:14:57 +01:00
Marc Mueller b0f72f59da
Use imports from `core` (#63458) 2022-01-05 14:55:38 +01:00
Ville Skyttä a598d9f353
Use HTTPStatus instead of HTTP_ consts and magic values in components/a* (#57988) 2021-10-22 14:21:34 +02:00
Franck Nijhof 2ec352ce96
Migrate attribution attribute for Aftership (#57649) 2021-10-14 10:25:19 +02:00
Erik Montnemery 4e07ab1b32
Move temperature conversions to sensor base class (1/8) (#48261)
* Move temperature conversions to entity base class (1/8)

* Update integrations a-c

* Leave old temperature conversion until all integrations are migrated

* tweak

* Use contextlib.suppress

* Remove the MeasurableUnitEntity mixin

* Address comments, add tests

* Fix f-string

* Drop deprecation warning from base entity class

* Update with _attr-shorthand

* Fix rebase mistakes

* Fix additional rebase mistakes

* Only report temperature conversion once

* Fix additional rebase mistakes

* Format homeassistant/components/bbox/sensor.py

* Fix check for overidden _attr_state

* Remove test workarounds from implementation

* Remove useless None-check

* Tweaks

* Migrate new sensors a-c

* Update climacell

* Push deprecation of temperature conversion forward

* Override __repr__ in SensorEntity

* Include native_value in SensorEntity attributes

* Pylint

* Black

* Black

* Fix rebase mistakes

* black

* Fix rebase mistakes

* Revert changes in august/sensor.py

* Revert handling of unit converted restored state

* Apply code review suggestion

* Fix arlo test
2021-08-11 10:45:05 +02:00
Robert Hillis 6d9628423c
Use entity class attributes for aftership (#52500)
* Use entity class attributes for aftership

* Tweaks

Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-07-05 10:37:00 +02:00
Michael bc006c9ecc
Add strict type annotations to aftership (#50692)
* add strict type annotations

* import PLATFORM_SCHEMA as BASE_PLATFORM_SCHEMA

* bring needed return back
2021-05-15 23:53:10 +03:00
Erik Montnemery e0cd7072d6
Migrate integrations a-c to extend SensorEntity (#48210) 2021-03-22 12:37:16 +01:00
Erik Montnemery 6c084ae6ce
Update integrations a-e to override extra_state_attributes() (#47756) 2021-03-11 16:51:03 +01:00
Joakim Sørensen 8ce32d67f9
Fallback to tag for any AfterShip tracking that have no checkpoints (#45053) 2021-01-12 10:33:14 +01:00
Maksym D 92b06ed5d4
Change AfterShip polling interval from 5m to 15m (#42360)
This change will prevent reaching API requests limit of AfterShip free-tier account.
2020-10-26 08:38:37 +01:00
springstan 8d61893c39
Use HTTP_OK constant (#33798)
* Use http ok constant

* Remove incorrect use

* Run isort

* Fix pylint by adding missing imports

* Fix pylint by fixing one import
2020-04-08 11:47:38 -05:00
springstan fca90a8ddc
Improve string formatting v5 (#33697)
* Improve string formatting v5

* Address review comments
2020-04-05 17:48:55 +02:00
springstan c20a965eda
Improve string formatting v3 (#33667)
* Improve string formatting v3

* Address review comment
2020-04-05 01:32:58 +02:00
Franck Nijhof e8a0abd107
String formatting improvements (#33635)
* String formatting improvements

* Found another one
2020-04-04 18:21:14 +02:00
Paulus Schoutsen aef06a3544
Directly call write state 2 (#33513)
* Directly call async_write_ha_state pt2

* Directly call async_write_ha_state pt2

* Fix mock

* Address comments
2020-04-03 09:34:50 +02:00
Paulus Schoutsen 4ebbabcdd1
Unsub dispatcher when removing entity from hass (#33510)
* Unsub dispatcher when removing entity from hass

* Update homeassistant/components/plaato/sensor.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/volvooncall/__init__.py

Co-Authored-By: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-04-02 09:25:33 -07:00
Ville Skyttä 5216477353
Be consistent with Home Assistant and Hass.io spelling (#30500)
* Be consistent with Home Assistant spelling

* Be consistent with Hass.io spelling
2020-01-05 14:09:17 +02:00
Franck Nijhof 9002955787 Move import to top for aftership (#28860) 2019-11-19 13:07:17 -06: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
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
David Barrera 3b8f254dfd Don't load last_checkpoint if shipment is pending (#24301) 2019-06-06 11:20:30 -05: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
Ian Richardson 8bfe77a1a0 Add aftership package details and add/remove services (#22275)
* 📦 Package details and add/remove services

* lint

* Cleanup

* lint

* Fix add tracking service call

* cleanup

* Make data easier to consume on the front-end

* lint

* Add expected delivery date

* call update after add/remove

* lint

* cleanup

* Add last_checkpoint

* address review comments

* remove formatting changes

* lint

* Address review comments

* address review comments

* address review comments

* lint

* lint
2019-04-11 15:57:48 -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