Commit Graph

56 Commits (e3a3f934415beb195e26317347cfee9af4e95633)

Author SHA1 Message Date
Franck Nijhof 2b27cfdabb
Set system & entity integration types (#79593) 2022-10-04 10:36:42 -04:00
epenet 6002377d4f
Convert UnitConverter protocol to a class (#78934)
* Convert UnitConverter protocl to a class

* Remove logic change

* Use TypeVar

* Remove NORMALIZED_UNIT from pressure

* Reduce size of PR

* Reduce some more

* Once more

* Once more

* Remove DEVICE_CLASS
2022-09-22 14:15:22 +02:00
epenet 39315b7fe3
Introduce UnitConverter protocol (#78888)
* Introduce ConversionUtility

* Use ConversionUtility in number

* Use ConversionUtility in sensor

* Use ConversionUtility in sensor recorder

* Add normalise to ConversionUtility

* Revert changes to recorder.py

* Reduce size of PR

* Adjust recorder statistics

* Rename variable

* Rename

* Apply suggestion

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

* Apply suggestion

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

* Apply suggestion

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

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-09-22 07:18:00 +02:00
epenet b56eabc35b
Enable disallow-any-generics in number (#78502) 2022-09-15 11:58:24 +02:00
GitHub Action 32a2999b85 [ci skip] Translation update 2022-08-06 00:24:46 +00:00
Franck Nijhof 7adb0f0ef5
Custom component -> Custom integration (#75404) 2022-07-18 22:10:22 +02:00
epenet 5287980f48
Remove template from mypy ignore list (#74426) 2022-07-14 21:15:37 +02:00
Erik Montnemery 924dce1b86
Log warning if number entities set _attr_unit_of_measurement (#74987) 2022-07-11 17:44:07 +02:00
Erik Montnemery 9d2c213903
Support overriding unit of temperature number entities (#74977) 2022-07-11 14:49:36 +02:00
Erik Montnemery 9680a367c8
Prevent using deprecated number features (#73578) 2022-06-20 10:26:24 +02:00
Erik Montnemery dea8041461
Add device_class to MQTT number and migrate to native_value (#73534) 2022-06-16 13:34:54 +02:00
Erik Montnemery 2d07cda4e7
Improve number deprecation warnings (#73552) 2022-06-16 09:05:13 +02:00
Erik Montnemery 7a82794ad7
Migrate template NumberEntity to native_value (#73537) 2022-06-15 17:06:44 +02:00
Erik Montnemery 23fa19b75a
Support restoring NumberEntity native_value (#73475) 2022-06-14 10:56:27 -07:00
Erik Montnemery 3da3503673
Add temperature unit conversion support to NumberEntity (#73233)
* Add temperature unit conversion to number

* Remove type enforcements

* Lint

* Fix legacy unit_of_measurement

* Address review comments

* Fix unit_of_measurement, improve test coverage
2022-06-14 09:40:57 +02:00
epenet 3a0e816f1b
Adjust device_automation type hints in core platforms 2/3 (#72210) 2022-05-23 16:02:36 +02:00
Franck Nijhof 7d2deae592
Clean up use of deprecated async_get_registry methods (#72001) 2022-05-17 13:40:19 +02:00
J. Nick Koston 4f8c7fe05b
Exclude static number attributes from being recorded in the database (#69194) 2022-04-03 15:43:44 +02:00
GitHub Action 5e366d93fc [ci skip] Translation update 2022-02-25 00:17:52 +00:00
GitHub Action ca7d4234e1 [ci skip] Translation update 2022-01-31 00:14:28 +00:00
GitHub Action 77ef86faee [ci skip] Translation update 2022-01-30 00:14:21 +00:00
Marc Mueller 04e1933728
Use correct relative imports [n-z] (#63471) 2022-01-05 17:23:49 +01:00
epenet b6dc89b4b7
Add max/min/step to NumberEntityDescription (#61100)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-06 09:56:46 -08:00
Marvin Wichmann 707fe67c00
Move StrEnum to homeassistant.backports and move Platform to homeassistant.const (#60880)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-12-03 09:31:17 +01:00
Franck Nijhof 7469f083fd
Migrate number mode to StrEnum (#60614) 2021-11-30 12:54:06 +01:00
GitHub Action d3c020325b [ci skip] Translation update 2021-11-25 00:13:33 +00:00
GitHub Action 31d4239b64 [ci skip] Translation update 2021-11-22 00:13:02 +00:00
Franck Nijhof dcaa689023
Add auto slider/box mode to number entity (#57737) 2021-10-21 07:20:39 +02:00
Marc Mueller aa7dc78a1e
Use assignment expressions 11 (#57792) 2021-10-17 20:15:48 +02:00
GitHub Action 291a2d6258 [ci skip] Translation update 2021-08-29 00:11:57 +00:00
Ville Skyttä 4bb2c6e00f
Improve device action type hinting (#54850)
* Improve device action type hinting

* More precise _async_get_automations type hints

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-20 07:13:25 +03:00
Jan Bouwhuis 8f014361d4
Validate Number value before calling entity method (#52343)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-04 11:57:26 +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
Franck Nijhof d3210ada1d
Allow None value return type for Number entity state value (#52302) 2021-06-29 15:07:31 +02:00
Franck Nijhof 7947946793
Type entry setup/unload for entity components (#51912) 2021-06-17 10:10:26 +02:00
Franck Nijhof 347ef9cb4c
Define NumberEntity entity attributes as class variables (#51842) 2021-06-14 09:05:01 -07:00
GitHub Action c81df50191 [ci skip] Translation update 2021-06-06 00:19:43 +00:00
Franck Nijhof eccefd154a
Extend targets for entity component services (#50760) 2021-05-17 14:06:50 +02:00
jan iversen 34b258e812
Rename HomeAssistantType —> HomeAssistant for integrations n* - p* (#49559) 2021-04-22 08:23:19 -10:00
Marc Mueller c07646db5d
Update typing syntax (#49480)
* Update typing syntax

* Replace typing imports with ones from collections where possible

* Changes after review
2021-04-20 17:40:41 +02:00
Erik Montnemery 4fbc3da196
Validate device action schemas once (#48351) 2021-03-26 08:46:26 +01:00
Marc Mueller 3d2b81a401
Update typing 11 (#48072) 2021-03-18 13:21:46 +01:00
HomeAssistant Azure 4306c8fbb4 [ci skip] Translation update 2021-03-17 00:03:55 +00:00
HomeAssistant Azure c11b85af2f [ci skip] Translation update 2021-03-16 00:04:36 +00:00
Franck Nijhof 5d5a110a20
None optional hass typing in base entity and notify (#47528) 2021-03-15 15:11:41 +01:00
Franck Nijhof ea4bbd771f
Add service names to previously enriched services (#46929)
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
2021-02-23 14:10:13 +01:00
HomeAssistant Azure fd60d4273b [ci skip] Translation update 2021-02-20 00:08:25 +00:00
Franck Nijhof b9d5b3c34e
Add selectors to Conversation, Image Processing and Number service definitions (#46746) 2021-02-18 17:13:59 +01:00
HomeAssistant Azure 8bacfcec50 [ci skip] Translation update 2021-02-13 00:03:13 +00:00
HomeAssistant Azure 818501216e [ci skip] Translation update 2021-02-07 00:06:57 +00:00