Commit graph

67 commits

Author SHA1 Message Date
epenet
b172abaeeb
Add new atmospheric pressure device class (#83455)
* Add new atmospheric pressure device class

* Translations

* Automatic conversion

* Convert all pressure units
2022-12-09 08:02:53 +01:00
epenet
38f62ae622
Add new sound pressure device class (#83453)
* Add new sound pressure device class

* Translations

* Docstring

* Adjust unit
2022-12-08 19:46:03 +01:00
epenet
c4326ed1ef
Add new irradiance device class (#83452) 2022-12-08 18:44:23 +01:00
epenet
9987f7a125
Add new data rate device class (#83377) 2022-12-08 18:20:05 +01:00
epenet
25961d71ef
Add new data size device class (#83376) 2022-12-08 16:47:36 +01:00
Franck Nijhof
ba0d6fe611
Enforce NumberDeviceClass in number entities (#83402) 2022-12-06 14:58:22 +01:00
epenet
b8613ec09d
Allow cm in precipitation units (#83360)
* Use new device class in zamg

* Adjust docstring

* Undo component changes
2022-12-06 10:34:58 +01:00
GitHub Action
03154e1d83 [ci skip] Translation update 2022-12-03 00:21:50 +00:00
GitHub Action
230b50d099 [ci skip] Translation update 2022-11-29 00:26:01 +00:00
epenet
dd960c4e62
Add precipitation device class (#81145) 2022-11-18 12:41:33 +01:00
Erik Montnemery
b6586d5c34
Align number and sensor device classes (#81909)
* Align number and sensor device classes

* Add tests

* Tweak tests
2022-11-17 14:00:28 +01:00
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