Commit graph

50 commits

Author SHA1 Message Date
G Johansson
824a0475ae
Change name to entity_id Number platform error messages (#87961) 2023-02-12 22:26:25 +01:00
Marc Mueller
f7b39aa4a8
Add Self typing (3) [mypy 1.0] (#87600) 2023-02-06 22:30:07 -06:00
Franck Nijhof
e55f11296e
Fix accidentally introduced breaking change in number entity (#87383) 2023-02-04 14:32:33 +01:00
Franck Nijhof
9ead071202
Tiny cleanup in Number base entity (#87339) 2023-02-04 10:04:44 +01:00
Erik Montnemery
a7fb3c82fb
Add WS command number/device_class_convertible_units (#85598)
* Add WS command number/device_class_convertible_units

* Add websocket_api

* Update tests
2023-01-12 09:34:10 +01:00
Franck Nijhof
cf5fca0464
Code styling tweaks to core entity components (#85460) 2023-01-08 13:40:08 -10:00
Erik Montnemery
c1075ebb8c
Allow SensorDeviceClass.POWER_FACTOR unit None (#85181) 2023-01-05 11:03:37 +01:00
epenet
e7e1a7d46e
Clarify NumberDeviceClass.PRECIPITATION docstring (#85051) 2023-01-03 12:31:01 +01:00
SukramJ
005bc8994d
Add mA to SensorDeviceClass.CURRENT units (#84492)
fixes undefined
2022-12-30 13:55:14 +01:00
Jan Bouwhuis
b2388b74d9
Add mV as a unit for voltage and enable conversions (#84805)
fixes undefined
2022-12-30 12:51:05 +01:00
epenet
4c8e3aa7c4
Remove lumen from Illuminance units (#84386) 2022-12-27 14:25:47 +01:00
Franck Nijhof
baef267f33
String formatting and max line length - Part 3 (#84394) 2022-12-22 13:35:47 +01:00
epenet
d60fe7e7cd
Use UnitOfTemperature in integrations (n-o) (#84306) 2022-12-20 18:39:09 +01:00
epenet
f4c13645d2
Add support for CCF volume unit (#84029) 2022-12-19 14:57:04 +01:00
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
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
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
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
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
Franck Nijhof
dcaa689023
Add auto slider/box mode to number entity (#57737) 2021-10-21 07:20:39 +02: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
jan iversen
34b258e812
Rename HomeAssistantType —> HomeAssistant for integrations n* - p* (#49559) 2021-04-22 08:23:19 -10:00
Marc Mueller
3d2b81a401
Update typing 11 (#48072) 2021-03-18 13:21:46 +01:00
Franck Nijhof
5d5a110a20
None optional hass typing in base entity and notify (#47528) 2021-03-15 15:11:41 +01:00
Martin Hjelmare
8d33c2092f
Add number entity value property (#43902) 2020-12-03 18:35:17 +01:00
Shulyaka
f744f7c34e
Add new number entity integration (#42735)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-12-02 13:50:48 +01:00