Commit graph

54 commits

Author SHA1 Message Date
Sid
0d66d298ec
Enable Ruff RET504 ()
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
epenet
0b01326f9f
Use is in ConfigEntryState enum comparison in tests (A-M) () 2024-04-05 17:16:55 +02:00
Joost Lekkerkerker
b9281327c4
Use FlowResultType enum in config flow tests A-M () 2024-04-03 09:21:17 +02:00
Joost Lekkerkerker
9b41e3d124
Use is in enum comparison in config flow tests A-E () 2024-04-02 11:22:05 -10:00
Marc Mueller
32f3f46542
Add empty line after module docstring (2) [tests.components] () 2024-03-08 19:16:21 +01:00
Marc Mueller
38adfbf1a3
Add empty line after module docstring [tests a-e] () 2024-03-08 08:50:25 -05:00
Jan-Philipp Benecke
9ab1cb83d8
Update a-c* tests to use entity & device registry fixtures ()
* Update a-c* tests to use entity & device registry fixtures

* Revert some changes

* Revert formatting

* retrigger CI
2023-11-12 13:45:30 -05:00
Paul Bottein
c98c18f25e
Return 'None' for light attributes when off instead of removing them () 2023-10-19 01:08:08 +02:00
Michał Huryn
ddfad75eb7
Add basic auth to Blebox ()
Co-authored-by: Robert Resch <robert@resch.dev>
2023-10-11 16:09:56 +02:00
J. Nick Koston
0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions () 2023-09-19 18:58:46 +02:00
Michał Huryn
e911b73b61
Add extra sensors to Blebox () 2023-08-30 10:20:45 +02:00
epenet
6836e15d98
Add type hints to tests () 2023-05-04 11:25:35 +02:00
Michał Huryn
0a51914740
Blebox cover tilt ()
* feature: added tilt for shutterBox

* test: include tilt in tests
2023-03-28 17:11:48 +02:00
epenet
0cf5e9fb4a
Add type hints to integration tests (part 2) ()
* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
2023-02-10 16:05:26 +01:00
epenet
807c69f621
Add type hints to integration tests (b-c) () 2023-02-08 18:08:43 +01:00
Franck Nijhof
ef800335fb
Enable Ruff PT022 ()
* Enable Ruff PT022

* Adjust found cases
2023-01-27 13:57:06 +01:00
Franck Nijhof
bfbf9b9751
Adjusts imports in tests to match our relative import rules () 2023-01-27 12:51:58 +01:00
Franck Nijhof
24fdd588fd
Code styling tweaks to the tests - Part 1 () 2023-01-20 13:52:46 +01:00
Michael
2850583085
Replace the usage of unit constants by enumerations in Tests [a-e] () 2023-01-15 14:44:01 +01:00
Michał Huryn
c737378ee1
Add blebox discovery/zeroconf ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-12-23 12:52:06 -10:00
Michał Huryn
923fa473e1
Blebox add thermoBox to climate ()
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-12-06 14:43:35 +01:00
Michał Huryn
a1c18b06fb
Blebox typehints in binary sensor tests () 2022-10-26 18:20:49 +02:00
Michał Huryn
4e4682d2e0
Add blebox binary_sensor platform ()
* Add binary_sensor platform, with test.

* Applied suggestions by @epenet

* refactor: as @epenet suggested, passing entity_description to init

* Update homeassistant/components/blebox/binary_sensor.py

@epenet suggestion, moved refactored logic of create_blebox_entities into BleBoxBinarySensorEntity init

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

* refactor: as @epenet class selector and entity creation moved to binary_sensor

* refactor: list comprehension in entity list setup in binary sensor

* Update homeassistant/components/blebox/binary_sensor.py

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2022-10-20 14:35:28 +02:00
epenet
374d46ec09
Improve type hints in blebox ()
* Add generics to blebox

* Remove walrus

* Move logic into each platform

* Code style

* Apply suggestion
2022-10-19 17:49:40 +02:00
Michał Huryn
ed044acca7
Remove blebox AirQuality platform ()
* AirQuality functionality moved to sensors, tests moved accordingly.

* Refreshed fixtures comments.
2022-09-30 11:37:47 +02:00
epenet
0d696b84b2
Cleanup root component imports in tests () 2022-09-21 06:57:41 -10:00
epenet
0ac581a0b1
Cleanup EntityFeature in tests () 2022-09-21 10:48:55 +02:00
Michał Huryn
169264db66
Fix Blebox light scenes ()
* Bug fix for light platform, when async_turn_on recieves multiple keys.

* Changes according to @MartinHjelmare suggestion.

* Moved effect set call in BleBoxLightEntity.async_turn_on method.

* Added tests for effect in light platform. Added ValueError raise if effect not in effect list.

* Removed duplicated line from test as @MartinHjelmare suggested.
2022-07-14 11:21:01 +02:00
Michał Huryn
6a37600936
Remove incorrect device class from blebox button ()
* Removed redundant attr device class from button.

* Removed irrelevant test for checking buttons device_class.
2022-07-12 10:01:53 +02:00
Michał Huryn
ca93aacc57
Add blebox tvLiftBox support ()
* Added tvLiftBox support.

* Changes after @epenet code review.

* After @epenet code review, dictionaries moved to relevant modules.

* Import path changed to full path.

* Removed redundant code in BLEBOX_TO_<platform>_DEVICE_CLASSES for switch and button platforms.

* Post isort on covers.

* Added tests, required version bump. As property was added inside dependency.
2022-07-11 12:24:37 +02:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum () 2022-07-07 19:57:36 +03:00
Michał Huryn
e7e940afa5
Address Blebox uniapi review sidenotes ()
* Changes accordingly to sidenotes given by @MartinHjelmare in pull .

* Mini version bump according to notes in pull .

* Error message fix, test adjustment.
2022-07-03 17:06:38 +02:00
Michał Huryn
b5af96e4bb
Bump blebox_uniapi to 2.0.0 and adapt integration () 2022-06-29 11:57:55 +02:00
epenet
7d2363ad22
Use light enums in tests () 2022-04-26 16:32:00 +02:00
epenet
e51ed7a11b
Use climate enums in blebox ()
* Use climate enums in blebox

* Adjust tests
2022-04-25 13:17:46 +02:00
Franck Nijhof
176f03d4ac
Allow toggles (switches) state to be None () 2022-01-23 11:31:01 +01:00
Dave T
f55668ff40
Use DeviceClass Enums in blebox tests () 2021-12-17 08:28:31 +01:00
Erik Montnemery
49a27e12ad
Add support to entity registry for overriding device_class () 2021-11-22 08:38:06 -08:00
Erik Montnemery
2583e4bdc9
Add support for RGBW color to blebox light () 2021-05-24 12:24:07 +02:00
Ville Skyttä
19d25cd901
Change config entry state to an enum ()
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
Erik Montnemery
78b21b1ad1
Update tests a-b to use async_get() instead of async_get_registry() () 2021-03-09 14:24:34 +01:00
Ville Skyttä
dc880118a4
Lint suppression cleanups ()
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Paulus Schoutsen
5dac3883b0
Stub light profiles () 2020-10-23 16:28:21 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
gadgetmobile
dc2fe66f29
Clean up blebox climate () 2020-05-26 13:29:19 +02:00
gadgetmobile
a22a86e4d2
Add Blebox climate support ()
* support BleBox climate

* refactor entity async_setup_entry functions

* use constants and simplify hvac mode setting

* apply fixes from review requests in 

* remove unneeded const mappings
2020-05-25 14:45:01 -05:00
gadgetmobile
93fddbed2b
Fix review requests for BleBox support from ()
* fix review requests from 

* fix pylint W0621 (redefined-outer-name)
2020-05-18 22:30:15 +02:00
gadgetmobile
902eb187ef
Add Blebox lights support ()
* add BleBox lights support

* cherry pick refactoring from 

* Inherit from LightEntity instead of Light

Co-authored-by: J. Nick Koston <nick@koston.org>

* import LightEntity instead of Light

Co-authored-by: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-17 18:54:32 -05:00
gadgetmobile
6e0359efa6
Add Blebox air quality support ()
* support BleBox air-quality

* fixed switch tests via cherry-pick from 

* fix test after cherry-picking

* fix flake8 issues
2020-05-16 10:51:37 -05:00