Commit Graph

39 Commits (b07e9df308a2fec26d76ee0ae046c5699d0546d1)

Author SHA1 Message Date
Keilin Bickar 615cd56f03
Add Support for SleepIQ Foot Warmers (#105931)
* Add foot warmer support

* Add Tests for foot warmers

* Move attr options out of constructor

* Change options to lowercase

* Update test and translations

* Switch back to entity

* Update homeassistant/components/sleepiq/strings.json

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-26 23:31:00 +01:00
Keilin Bickar f4f3962ee9
Bump asyncsleepiq lib to 1.3.3 (#91772) 2023-04-20 12:01:49 -10:00
epenet bf5f7c53d8
Move mock_setup_entry to conftest (#88484) 2023-03-06 11:31:50 +01:00
Erik Montnemery 273d289e03
Fix sleepiq test to not contact the API (#88315)
* Fix sleepiq test to not contact the API

* Add an autosue fixture for config entry setup
2023-02-17 12:32:27 +01:00
epenet 3a9adacdde
Add type hints to integration tests (part 20) (#88179) 2023-02-15 15:23:34 +01:00
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet ba85fdcd61
Add type hints to integration tests (q-s) (#87706) 2023-02-08 08:12:54 -08:00
Franck Nijhof 5e81d28116
Update black to 23.1.0 (#87188) 2023-02-02 18:35:24 +01:00
epenet 7bc2712142
Adjust root-import in tests (#78761)
* Adjust root-import in tests

* Adjust diagnostics

* Adjust button

* Adjust select

* Adjust device_tracker

* Adjust camera

* Adjust humidifier

* Adjust media_source

* Adjust update

* Adjust siren

* Adjust number

* Adjust alarm_control_panel

* Adjust notify

* Adjust sensor

* Adjust switch

* Revert anthemav

* Don't adjust demo humidifier
2022-09-19 15:22:23 +02:00
epenet e9f55f4e54
Apply hass-relative-import to tests (s-z) (#78733) 2022-09-19 09:51:31 +02:00
Franck Nijhof 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03:00
Mike Fugate 836b051be9
Fix SleepIQ firmness number step and min values (#69757)
* fix sleepiq firmness number step and min values

* add asserts for min/max/step attributes
2022-04-09 22:46:58 +03:00
Keilin Bickar 1563420de8
Bump asyncsleepiq to 1.2.3 (#69104) 2022-04-02 10:44:16 +02:00
Mike Fugate 4dc8aff3d5
Bump asyncsleepiq to 1.2.1 (#68680) 2022-03-25 10:47:28 -10:00
Mike Fugate ad7a2c298b
Add SleepIQ select entity for foundation preset positions (#68489) 2022-03-23 16:14:39 -10:00
Mike Fugate e59bf4f3af
Migrate SleepIQ unique IDs that are using sleeper name instead of sleeper ID (#68062) 2022-03-12 12:54:26 -10:00
Mike Fugate 6831be67f4
Add number entities to control SleepIQ actuator positions (#67770) 2022-03-12 09:58:03 -10:00
Mike Fugate cc9fd2bcba
Add firmness number entity to SleepIQ (#65841) 2022-03-05 11:45:56 -10:00
Keilin Bickar 24e0c0b092
Add pressure sensor for SleepIQ (#67574) 2022-03-03 10:27:22 -10:00
Keilin Bickar 423c14e2a1
Add light entity to SleepIQ (#67363) 2022-03-03 09:42:33 -10:00
Keilin Bickar bafa99fe3e
Add reauth to SleepIQ (#67321)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-02-27 15:47:31 -10:00
Mike Fugate 858c09060d
Validate SleepIQ connection/credentials for the import step (#67292) 2022-02-26 17:55:11 +01:00
Keilin Bickar 7f5304b6c2
Add Switch entity to SleepIQ (#66966)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-02-21 21:53:04 -10:00
Keilin Bickar d59dbbe859
Create button entities for SleepIQ (#66849) 2022-02-19 11:54:52 -06:00
Keilin Bickar a367d2be40
Modernize Sleepiq and add new entities (#66336)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-02-18 12:50:44 -06:00
Mike Fugate 0bd0b4766e
Refactor sleepiq as async with config flow (#64850)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-02-16 08:51:29 -06:00
Ville Skyttä 50e0c58310
Use http.HTTPStatus in components/s* (#58291) 2021-10-23 20:49:04 +02:00
Erik Montnemery e558b3463e
Move temperature conversions to sensor base class (6/8) (#54476)
* Move temperature conversions to entity base class (6/8)

* Fix tests
2021-08-12 17:40:55 +02:00
Franck Nijhof 5a2b5fe7c5
Yoda assertion style removed is (#48142) 2021-03-20 13:55:10 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
dmonego c8821d930e
Move sleepiq tests to pytest style functions (#42018) 2020-10-19 23:31:33 +02:00
Paulus Schoutsen c33edbe5bb
Use TestCase.addCleanup (#36560) 2020-06-08 12:26:40 -07:00
Paulus Schoutsen 2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Franck Nijhof 906385172a
String formatting improvements for tests (#33663) 2020-04-05 00:26:08 +02:00
Bas Nijholt 53012a548b Sort imports according to PEP8 for sleepiq (#29759) 2019-12-09 13:21:45 +01:00
Paulus Schoutsen 4de97abc3a Black 2019-07-31 12:25:30 -07:00
David Winn 628e12c944 Sleepiq single sleeper crash (#24941)
* Update sleepyq to 0.7

Fixes crash when working with a single sleeper.

* sleepiq: Handle null side definitions

These happen if no sleeper is defined for a side of the bed. Don't
create sensors for null sides; they'll crash every time we try to use
them.

* sleepiq: Fix urls mocked to match sleepyq 0.7

* sleepi: Fix test_sensor.TestSleepIQSensorSetup

Sleepyq 0.7 throws on empty strings, so we have to specify them.

* sleepiq: Test for ValueError thrown by sleepyq 0.7

* sleepiq: Drop no longer used HTTPError import

* sleepiq: Add tests for single sleeper case

* sleepiq: Shorten comments to not overflow line length

* sleepiq: Use formatted string literals for adding suffixes to test files

* sleepiq: Use str.format() for test suffixing
2019-07-07 08:40:02 +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 b8cc547fa3
Move components to folders (#20774)
* Move all components into folders

* Move component tests into folders

* Fix init moving

* Move tests

* Lint

* Update coverage

* Fix service descriptions

* Update CODEOWNERS
2019-02-05 19:31:15 -08:00