Commit Graph

79 Commits (cbb3d48bd9417fe855820b33ca61ea3d9350a4dc)

Author SHA1 Message Date
Ron Weikamp 2814ed5003
Add allow_negative configuration option to DurationSelector (#116134)
* Add configuration option positive to DurationSelector

* Rename to allow_negative in conjunction with a deprecation notice

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

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-05-30 17:42:34 +02:00
Marc Mueller 8f0fb4db3e
Use PEP 695 for class annotations (4) (#117778) 2024-05-20 10:44:52 +02:00
Allen Porter b84829f70f
Import and cache supported feature enum flags only when needed (#117270)
* Import and cache supported feature enum flags only when needed

* Add comment aboud being loaded from executor.

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-13 21:07:39 -07: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
Franck Nijhof 4a93b4a4b4
Add floor selector (#114614) 2024-04-02 10:43:14 +02:00
Franck Nijhof 9a32d1bbd5
Add label selector (#111029)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2024-03-26 20:31:06 +01:00
Marc Mueller 19ab3d6daf
Add empty line after module docstring [helpers + other] (#112707) 2024-03-08 10:36:11 -05:00
Bram Kragten d361d47516
Add qr code selector (#109214) 2024-01-31 19:27:03 +01:00
karwosts a2d707442a
Fix error when passing a whole number to location selector (#108952)
* Fix error when passing an integer to location selector

* fix tests

* more fix tests

* don't mutate original dict

* remove string testcase
2024-01-28 14:13:00 +01:00
Miguel Camba 5175737b60
Add Valve integration (#102184)
* Add Valve integration.

This adds the valve integration discussed in https://github.com/home-assistant/architecture/discussions/975
Most of the code is taken from the cover integration but simplified since valves
can't tilt.

There are a couple outstanding errors I'm not sure how to solve and prevents
me from even making this commit without `--no-verify`.

* Apply PR feedback

* Apply more feedback: Intruduce the bare minimum

* Remove file commited by mistake

* Hopefully this fixes tests

* Match cover's typing and mypy settings

* Change some configuration files

* Fix test

* Increase code coverage a little

* Code coverate inproved to 91%

* 95% code coverage

* Coverate up to 97%

* Coverage 98%

* Apply PR feedback

* Even more feedback

* Add line I shouldn't have removed

* Derive closed/open state from current position

* Hopefully last feedback

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Remove unnecesary translation

* Remove unused method arguments

* Complete code coverage

* Update homeassistant/components/valve/__init__.py

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

* Simplify tests

* Update homeassistant/components/valve/__init__.py

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

* Apply last feedback

* Update tests/components/valve/test_init.py

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

* Update tests/components/valve/test_init.py

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

* Update tests/testing_config/custom_components/test/valve.py

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

* More feedback

* Apply suggestion

* And more feedback

* Apply feedback

* Remove commented code

* Reverse logic to unindent

* Update homeassistant/components/valve/__init__.py

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

* Update homeassistant/components/valve/__init__.py

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

* Implement stop valve for Mock valve

* Fix tests now that I've implemented stop_valve

* Assert it's neither opening nor closing

* Use current position instead

* Avoid scheduling executor when opening or closing

* Fix incorrect bitwise operation

* Simplify toggle

* Remove uneeded partial functions

* Make is_last_toggle_direction_open private

* Remove valve from test custom integration

* Improve test coverage

* Address review comments

* Address review comments

* Address review comments

* Update homeassistant/components/valve/__init__.py

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

* Update tests

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik <erik@montnemery.com>
2023-12-18 19:48:00 +01:00
Erik Montnemery 2515e520c1
Allow step size any for number selector in slider mode (#105978) 2023-12-18 15:30:59 +01:00
Paul Bottein 38eda9f46e
Add multiple option to text selector (#104635)
Co-authored-by: Robert Resch <robert@resch.dev>
2023-11-29 18:32:32 +01:00
schelv 31cab5803c
Add Option For Kelvin Unit To Color Temperature Selector (#103799) 2023-11-29 12:25:06 +01:00
Paul Bottein 89a9e6c6e8
Add trigger selector for blueprint (#103050) 2023-11-03 09:11:49 +01:00
Allen Porter 5d430f53cd
Add todo component (#100019) 2023-10-23 22:53:00 +02:00
G Johansson dc29190564
CountrySelector (#100963)
* CountrySelector

* rename

* remove multiple for now

* Add no_sort

* Update homeassistant/helpers/selector.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-10-12 16:44:30 +02:00
Michael Arthur 82b3ced4f1
Add lawnmower entity (#93623)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-08-21 12:19:55 +02:00
Erik Montnemery 683c2f8d22
Add service for getting a weather forecast (#97078)
* Add service for getting a weather forecast

* Fix translations

* Improve service description

* Improve error handling

* Adjust typing

* Adjust typing

* Adjust service response format
2023-08-07 14:05:37 +02:00
Paul Bottein 83af2f5b8b
Allow to sort options in select selector (#97680)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-08-03 21:49:22 +02:00
Paulus Schoutsen aad281db18
Add service to OpenAI to Generate an image (#97018)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-07-26 10:14:18 +02:00
Franck Nijhof 30058297cf
Migrate backported StrEnum to built-in StrEnum (#97101) 2023-07-23 23:19:24 +02:00
Marc Mueller 77f38e33e5
Import names from typing instead of typing_extensions [3.11] (#97065) 2023-07-22 17:03:44 -05:00
Paul Bottein d8c989f732
Make default theme selectable for set theme service (#96849) 2023-07-18 17:36:35 +02:00
Franck Nijhof b9f92b526b
Add prefix support to text selector (#96830) 2023-07-18 12:17:31 +02:00
Paul Bottein e513b7d0eb
Add condition selector for blueprint (#96350)
* Add condition selector for blueprint

* Add tests and validation

* Update comment
2023-07-12 10:58:35 -04:00
Erik Montnemery 3d064b7d6b
Add filters to cover/services.yaml (#95854) 2023-07-08 11:51:02 +02:00
Bram Kragten a7dfe46fb1
Add conversation agent selector, use in `conversation.process` service (#95462) 2023-06-28 21:38:06 -04:00
Raman Gupta aab58ad89c
Fix entity and device selector TypedDict's (#94510) 2023-06-13 10:52:55 +02:00
Mike Degatano 08a719e09e
Add backup location and mount failed repair (#93126)
* Add backup location and mount failed repair

* Fix coverage

* Change storage_location to backup_location

* Use backticks

* Update homeassistant/helpers/selector.py

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-05-24 10:33:41 +02:00
Bram Kragten aa4544accb
Add assist pipeline and language selectors (#92030) 2023-04-26 18:39:02 +02:00
Erik Montnemery 9384ec18f8
Add filters to climate and light service descriptions (#86162)
* Add filters to climate and light service descriptions

* Allow specifying enums directly

* Update service descriptions

* Adjust test

* Cache entity features

* Lint

* Improve error handling, add list of known base components

* Don't allow specifying an entity feature as int
2023-03-16 15:59:51 +01:00
Erik Montnemery 886c2635ad
Add support for constant selector (#89573)
* Add support for constant selector

* Adapt to frontend PR changes
2023-03-16 09:02:26 -04:00
Paul Bottein e95944bf9f
Add filter options to entity and device selectors (#87536)
* Add support for multiple device classes

* Add support for entity filter selector

* Add support for device filter selector

* Apply suggestions

* Fix wrong property name

* Update snapshot

---------

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2023-02-27 10:38:18 -05:00
Jan Bouwhuis 25392655e7
Allow translating select selector options (#85531)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-01-17 16:22:19 +01:00
Franck Nijhof 5cfa98e400
Improve typing of SelectorConfig (#85022) 2023-01-02 18:52:15 -05:00
G Johansson 6cb004b770
Selector for SingleEntitySelectorConfig allow domain to be a list (#82666) 2022-11-24 22:34:39 +01:00
epenet 9132c42037
Improve Selector typing (#82636) 2022-11-24 19:27:26 +01:00
Steve Repsher c940ad9920
Add autocomplete to text selector (#81060) 2022-11-15 12:58:59 -06:00
Erik Montnemery 84a812ad05
Allow setting number selector step size to 'any' (#78265)
* Allow setting number selector step size to 'any'

* Improve test coverage
2022-09-15 08:29:46 +02:00
Franck Nijhof dfc3e7d80f
Don't expose attribute option in state selector (#77347) 2022-08-26 11:51:36 +02:00
Franck Nijhof 4d02cccd11
Fix typing of ConfigEntrySelector (#77259) 2022-08-24 15:15:29 +02:00
Franck Nijhof dc17bca00c
Add config entry selector (#77108) 2022-08-24 00:29:30 +02:00
Franck Nijhof 5a0e4fa5ee
Add hide attribute support to attribute selector (#77072)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-08-22 12:55:30 +02:00
Franck Nijhof 453307e01a
Add attribute support to state selector (#77071) 2022-08-20 13:30:38 -04:00
Franck Nijhof 2d197fd59e
Add state selector (#77024)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-08-19 09:24:53 -04:00
Paulus Schoutsen 6e92931087
Add file selector and file upload integration (#76672) 2022-08-18 12:02:12 -04:00
J. Nick Koston 034c0c0593
Improve YAML Dump times with C Dumper (#73424) 2022-06-13 13:14:30 -07:00
Paulus Schoutsen e35a5a1a28
Fix other enums in helpers (#71505) 2022-05-07 20:57:48 -07:00
Paulus Schoutsen b1a04302b5
Stringify enums in selectors (#71441) 2022-05-06 11:25:01 -07:00
Paulus Schoutsen 353cc0b8c2
Fix importing blueprints (#71365)
Co-authored-by: Shay Levy <levyshay1@gmail.com>
2022-05-05 14:33:17 -07:00