Commit Graph

5 Commits (cc4fae10f5c7e58cd894b84fd72308b2feb9af44)

Author SHA1 Message Date
Joost Lekkerkerker 352987db7e
Make Laundrify unique id a string (#127092) 2024-09-30 13:21:20 +02:00
xLarry 7ada2f864c
Add sensor platform to laundrify integration (#121378)
* feat: initial implementation of sensor platform

* refactor(tests): await setup of config_entry in parent function

* feat(tests): add tests for laundrify sensor platform

* refactor: set name property for laundrify binary_sensor

* refactor(tests): add missing type hints

* refactor(tests): remove global change of the logging level

* refactor: address minor changes from code review

* refactor(tests): transform setup_config_entry into fixture

* refactor: leverage entity descriptions to define common entity properties

* refactor: change native unit to Wh

* fix(tests): use fixture to create the config entry

* fix: remove redundant raise of LaundrifyDeviceException

* fix(tests): raise a LaundrifyDeviceException to test the update failure behavior

* refactor(tests): merge several library fixtures into a single one

* refactor(tests): create a separate UpdateCoordinator instead of using the internal

* refactor(tests): avoid using LaundrifyPowerSensor

* refactor: simplify value retrieval by directly accessing the coordinator

* refactor: remove non-raising code from try-block

* refactor(sensor): revert usage of entity descriptions

* refactor(sensor): consolidate common attributes and init func to LaundrifyBaseSensor

* refactor(sensor): instantiate DeviceInfo obj instead of using dict

* refactor(tests): use freezer to trigger coordinator update

* refactor(tests): assert on entity state instead of coordinator

* refactor(tests): make use of freezer

* chore(tests): typo in comment
2024-09-16 16:21:16 +02:00
epenet 0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) (#114925) 2024-04-05 17:16:55 +02:00
epenet ea11a30a35
Add type hints to integration tests (part 13) (#87998) 2023-02-13 14:38:37 +01:00
xLarry abf9aab18f
Add laundrify integration (#65090)
* First version of laundrify integration

* Code cleanup

* Code cleanup after review #2

* Move coordinator to its own file

* Save devices as dict and implement available prop as fn

* Validate token on init, abort if already configured

* Some more cleanup after review

* Add strict type hints

* Minor changes after code review

* Remove OptionsFlow (use default poll interval instead)

* Fix CODEOWNERS to pass hassfest job

* Fix formatting to pass prettier job

* Fix mypy typing error

* Update internal device property after fetching data

* Call parental update handler and remove obsolete code

* Add coordinator tests and fix some config flow tests

* Refactor tests

* Refactor fixtures

* Device unavailable if polling fails
2022-05-21 15:18:01 -04:00