Commit Graph

14 Commits

Author SHA1 Message Date
Franck Nijhof ca1a12898c
Enable Ruff D212 (#87347) 2023-02-03 23:08:48 +01:00
epenet ff5f1aee53
Enforce SirenEntityFeature (#82464) 2022-11-22 07:16:29 +01:00
epenet 0c887eab87
Cleanup access to supported features (#82274) 2022-11-17 20:00:52 +01:00
epenet 295cd0143c
Adjust type hints for SirenEntityFeature (#82266) 2022-11-17 15:06:26 +01:00
epenet 64988521bb
Make use of generic EntityComponent (part 2) (#78494) 2022-09-17 18:18:53 +02:00
Raman Gupta c390834ae4
Add available tones property to siren entity description (#70216)
* Fix siren entity description and available tones property

* Add test

* Fix bug

* Add coverage
2022-04-21 02:33:22 -04:00
epenet a61ac3ddc6
Add EntityFeature enum to Siren (#69585)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2022-04-07 23:08:09 +02:00
Raman Gupta 2e903c92c4
Add siren support for available tones provided as a dict (#54198)
* Add siren support for available tones provided as a dict

* remove paranthesis

* hopefully make logic even easier to read

* drop last parenthesis
2021-08-09 00:41:51 -04:00
Milan Meulemans 0471b27179
Replace HomeAssistantType with HomeAssistant (#53545) 2021-07-27 12:30:56 +02:00
Franck Nijhof 0b44265232
Add description classes to entity components (#53521)
* Add description classes to entity components

* An -> A

* Add StateVacuumEntityDescription
2021-07-27 00:22:21 +02:00
Raman Gupta 026ca4e4e4
Additional fixes for siren platform (#52971) 2021-07-13 10:56:41 -07:00
Raman Gupta 30def802fc
Validate tone is valid when processing siren.turn_on service call (#52953)
* Validate tone is valid when processing siren.turn_on service call

* Better message
2021-07-13 10:42:35 +02:00
Raman Gupta 92e4013f73
Fix siren turn on parameter filtering (#52947)
* Fix siren turn on parameter filtering

* fix test
2021-07-12 22:18:04 -04:00
Raman Gupta 0f076610fd
Add siren platform (#48309)
* Add siren platform

* add more supported flags and an ability to set siren duration

* tone can be int or string

* fix typing

* fix typehinting

* fix typehints

* implement a proposed approach based on discussion

* Address comments

* fix tests

* Small fix

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* Update homeassistant/components/demo/siren.py

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

* typing

* use class attributes

* fix naming

* remove device from service description

* Filter out params from turn on service

* fix tests

* fix bugs and tests

* add test

* Combine is_on test with turn on/off/toggle service tests

* Update homeassistant/components/siren/__init__.py

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

* fix filtering of turn_on attributes

* none check

* remove services and attributes for volume level, default duration, and default tone

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* import final

* Update homeassistant/components/siren/__init__.py

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Fix typing and used TypedDict for service parameters

* remove is_on function

* remove class name redundancy

* remove extra service descriptions

* switch to positive_int

* fix schema for tone

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-07-11 16:51:11 -04:00