Commit Graph

197 Commits (c4d8cda92be330311fd83809588c7e0131d1c49b)

Author SHA1 Message Date
epenet 7c9992f5d3
Migrate demo light tests to use Kelvin (#133003) 2024-12-12 20:37:32 +01:00
G Johansson 2eaf206562
Implement new state property for vacuum which is using an enum (#126353)
* Implement new state property for vacuum which is using an enum

* Mod

* Mod init

* Mods

* Fix integrations

* Tests

* Fix state

* Add vacuum tests

* Fix last test

* Litterrobot tests

* Fixes

* Tests

* Fixes

* Fix VacuumEntity

* Mods

* Mods

* Mods

* Update demo

* LG

* Fix vacuum

* Fix Matter

* Fix deprecation version

* Mods

* Fixes

* Fix ruff

* Fix tests

* Fix roomba

* Fix breaking dates
2024-12-06 11:16:03 +01:00
Petar Petrov c68cadad7a
Improve precision of HSV color conversion (#130880) 2024-11-19 22:06:57 +01:00
Erik Montnemery 599acaf514
Improve demo integration's update entity (#129401)
* Improve demo integration's update entity

* Improve tests
2024-10-30 08:06:22 +01:00
Erik Montnemery e861cab727
Add update_percentage state attribute to update entity (#128877)
* Add update_percentage state attribute to update entity

* Update tests

* Update tests
2024-10-21 15:31:48 +02:00
G Johansson 666e8e133e
Cover state is enum (#127144)
* Change light state to use enum

* Adjust cover tests

* Update cover

* Fix covers

* Some tests

* More tests

* Fix tests

* Fix
2024-10-08 18:39:04 +02:00
G Johansson 93aade6e8e
Change lock state to an enum (#126379)
* Add new LockState enum for lock states

* Add rest

* Fix insteon tests

* Fix mqtt tests

* Fix tesla_fleet

* Revert back ST_STATE_LOCKED

* Add back constant
2024-09-24 12:30:50 +02:00
G Johansson 711e0ee503
Change camera state to an enum (#126558)
* Change camera state to an enum

* copy/paste mistake

* Add test deprecated constants
2024-09-24 12:12:01 +02:00
epenet aab939cf6c
Add alias to DOMAIN import in tests [a-d] (#125573) 2024-09-09 15:20:40 +02:00
epenet 5608301178
Add missing return type in test __init__ methods (#123932)
* Add missing return type in test __init__ methods

* Adjust
2024-08-14 16:48:52 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
Joost Lekkerkerker 03c6e0c55f
Fix SIM300 (#120725) 2024-06-28 10:46:02 +02:00
epenet 7f20c1a489
Improve type hints in demo tests (#120387) 2024-06-25 09:55:59 +02:00
Marc Mueller 2e3aeae520
Extend component root imports in tests (2) (#120123) 2024-06-22 09:06:05 +02:00
epenet 26e21bb356
Adjust incorrect unnecessary-lambda pylint disable statement in demo tests (#119666) 2024-06-14 08:25:35 +02:00
epenet ca8d3e0c83
Ignore unnecessary-lambda warnings in tests (#119564) 2024-06-13 16:58:41 +02:00
Erik Montnemery 04a5a1d18b
Improve demo config flow and add tests (#118481)
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-06-09 16:02:58 +02:00
Sid 721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
Marc Mueller 7195a21126
Fix Generator annotations in tests (2) (#119019) 2024-06-07 08:34:38 +02:00
epenet 0c38aa56f5
Rename calls fixture in components tests (#118355) 2024-05-29 09:26:44 +02:00
J. Nick Koston 5a609c34bb
Fix blocking I/O in the event loop when loading timezones (#117721) 2024-05-20 11:06:03 +02:00
G Johansson 7862596ef3
Add `open` state to LockEntity (#111968)
* Add `open` state to LockEntity

* Add tests

* Fixes

* Fix tests

* strings and icons

* Adjust demo open lock

* Fix lock and tests

* fix import

* Fix strings

* mute ruff

* Change sequence

* Sequence2

* Group on states

* Fix ruff

* Fix tests

* Add more test cases

* Sorting
2024-05-08 20:42:22 +02:00
Sid 2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Jan Bouwhuis 84308c9e53
Add title feature to notify entity platform (#116426)
* Add title feature to notify entity platform

* Add overload variants

* Remove overloads, update signatures

* Improve test coverage

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Do not use const

* fix typo

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-05-03 11:17:28 +02:00
J. Nick Koston 381ffe6eed
Use built-in aiohttp timeout instead of asyncio.timeout in media_player (#116364)
* Use built-in aiohttp timeout instead of asyncio.timeout in media_player

Avoids having two timeouts running to fetch images

* fix mock
2024-04-29 07:38:40 +02:00
Jan Bouwhuis 36bdda5669
Migrate demo notify platform (#115448)
* Migrate demo notify platform

* Update homeassistant/components/demo/notify.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

* Remove no needed tests

* Cleanup redundant attribute assignment

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-04-13 14:27:07 +02:00
Sid 9bf87329da
Enable Ruff FLY002 rule (#115112)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2024-04-12 09:04:16 +02:00
Jan Bouwhuis acf2f855fe
Raise ServiceValidationError on number out of range exception (#114589) 2024-04-02 12:22:00 +02:00
Sid d5f883fbf0
Unignore Ruff PLR in tests (#114470)
* Unignore Ruff PLR in tests

* Address review comments

* review comments

* fix import

* Update test_api.py

* Update test_api.py

* Update test_api.py
2024-04-01 11:11:59 +02:00
Marc Mueller 44eeb2eb5e
Allow Humidifier.current_humidity to be a float (#111297)
* Allow Humidifier.current_humidity to be a float

* Code review

* Allow climate humidity values to be float

* Update demo integration
2024-03-27 11:19:20 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Erik Montnemery 25fe74aec5
Remove AUX heating from demo climate (#113929) 2024-03-21 11:35:27 +01:00
Sid 00ec7f11f0
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2024-03-19 09:01:07 +01:00
Sid ccd2e989c3
Enable ruff RUF005 and fix occurrences (#113589) 2024-03-16 07:37:20 -10:00
J. Nick Koston a50883d975
Run service call tasks eagerly (#112791) 2024-03-08 20:37:21 -10:00
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Paul Bottein 02ac985120
Use right initial attribute value for demo climate (#108719) 2024-01-29 21:46:04 +01:00
Jan Bouwhuis 3ff74fe20f
Refactor demo vacuum's to only use StateVacuum base class and features (#108150)
* Demo cleanup

* Refactor vacuum demo to only use state vacuum base class

* Remove unneeded feature checks

* Remove exclusion issue for mqtt an demo
2024-01-16 16:44:12 +01:00
G Johansson 83f4d3af5c
Implement mode validation in Climate entity component (#105745)
* Implement mode validation in Climate entity component

* Fix some tests

* more tests

* Fix translations

* fix deconz tests

* Fix switcher_kis tests

* not None

* Fix homematicip_cloud test

* Always validate

* Fix shelly

* reverse logic in validation

* modes_str

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-27 14:51:39 +01:00
Jan Bouwhuis c7eab49c70
Raise ServiceValidationError on invalid select option (#106350)
* Raise ServiceValidationError on invalid select option

* Fix tests

* Correct place holders

* More test fixes
2023-12-27 09:45:55 +01:00
Jan-Philipp Benecke 61a99c911c
Migrate demo test to use freezegun (#105644) 2023-12-13 14:33:59 +01:00
Jan Bouwhuis 953a212dd6
Use ServiceValidationError for invalid fan preset_mode and move check to fan entity component (#104560)
* Use ServiceValidationError for fan preset_mode

* Use _valid_preset_mode_or_raise to raise

* Move preset_mode validation to entity component

* Fix bond fan and comments

* Fixes baf, fjaraskupan and template

* More integration adjustments

* Add custom components mock and test code

* Make NotValidPresetModeError subclass

* Update homeassistant/components/fan/strings.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Keep bond has_action validation

* Move demo test asserts outside context block

* Follow up comment

* Update homeassistant/components/fan/strings.json

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Fix demo tests

* Remove pylint disable

* Remove unreachable code

* Update homeassistant/components/fan/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Use NotValidPresetModeError, Final methods

* Address comments

* Correct docst

* Follow up comments

* Update homeassistant/components/fan/__init__.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-11-29 13:56:51 +01:00
J. Nick Koston f91583a0fc
Add support for family to aiohttp session helper (#102702) 2023-10-24 18:40:39 -05:00
G Johansson 3c3f512583
Remove setup_platform for demo (#100867) 2023-10-15 23:12:41 +02:00
Tudor Sandu 542ab2dd76
Fix ignored argument in service call for demo climate (#101137)
Fix service call for demo climate
2023-09-29 23:06:41 -04:00
Jan Bouwhuis 714a04d603
Add service turn_on and turn_off service for water_heater (#94817) 2023-07-25 10:16:05 +02:00
G Johansson 4e30056830
Add new Forecasting to Weather (#75219)
* Add new Forecasting to Weather

* Add is_daytime for forecast_twice_daily

* Fix test

* Fix demo test

* Adjust tests

* Fix typing

* Add demo

* Mod demo more realistic

* Fix test

* Remove one weather

* Fix weather example

* kitchen_sink

* Reverse demo partially

* mod kitchen sink

* Fix twice_daily

* kitchen_sink

* Add test weathers

* Add twice daily to demo

* dt_util

* Fix names

* Expose forecast via WS instead of as state attributes

* Regularly update demo + kitchen_sink weather forecasts

* Run linters

* Fix rebase mistake

* Improve demo test coverage

* Improve weather test coverage

* Exclude kitchen_sink weather from test coverage

* Rename async_update_forecast to async_update_listeners

* Add async_has_listeners helper

* Revert "Add async_has_listeners helper"

This reverts commit 52af3664bb06d9feac2c5ff963ee0022077c23ba.

* Fix rebase mistake

---------

Co-authored-by: Erik <erik@montnemery.com>
2023-07-21 17:30:48 +02:00
Erik Montnemery 39208a3749
Remove unsupported vacuum service handlers (#95787)
* Prevent implementing unsupported vacuum service handlers

* Remove unsupported service handlers

* Update test
2023-07-10 15:03:40 +02:00
Erik Montnemery 96c71b214f
Check supported features in calls to vacuum services (#95833)
* Check supported features in vacuum services

* Update tests

* Add comment
2023-07-10 13:05:47 +02:00