Erik Montnemery
5a7c3aaa2d
Add sensor device class volatile_organic_compounds_parts ( #92973 )
2023-05-12 14:37:54 +02:00
Erik Montnemery
7546e8efa4
Remove stale comment from sensor.const ( #92974 )
2023-05-12 14:34:29 +02:00
Raman Gupta
bfea1367a7
Add ms
to units comment for duration sensor device class ( #90757 )
2023-04-04 12:42:33 +02:00
Raman Gupta
16028dc9bc
Add milliseconds as valid duration sensor unit ( #90018 )
2023-03-26 23:52:01 +02:00
Erik Montnemery
fca5cc6ea3
Add number + sensor device class volume storage ( #88312 )
...
* Add number + sensor device class volume storage
* Fix typo
* Format code
* Update device automations
2023-03-01 11:22:57 +01:00
Erik Montnemery
69ce6980d6
Add number + sensor device class energy storage ( #88310 )
...
* Add number + sensor device class energy storage
* Format code
* Update device automations
2023-02-28 19:35:43 +01:00
Erik Montnemery
f0b7343993
Change state class of weight sensors from total to measurement ( #88314 )
2023-02-18 13:26:53 +01:00
Franck Nijhof
bf482eee24
Extend state class sensor warnings with expected values ( #87294 )
2023-02-04 11:49:24 +01:00
epenet
cc469ab9a9
Add unit conversion to Power sensors ( #87136 )
...
* Add missing PowerConverter to UNIT_CONVERTERS
* Adjust tests
2023-02-02 10:27:12 +01:00
Jan Bouwhuis
2e16b7e2df
Add numeric_state_expected property to Sensor class ( #87013 )
...
* Add is_numeric property to Sensor class
* Follw up comment
* Update homeassistant/components/sensor/__init__.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Update homeassistant/components/sensor/__init__.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* Tests and corrections
* Simplify converion check
* Correct custom device class handling
* Update homeassistant/components/sensor/__init__.py
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
* rename to numeric_state_expected
* Replace with new const
* Adjust docstr
* Update homeassistant/components/sensor/__init__.py
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
* Move to const
* Correct logic
* Do not use bool
* Adjust docstr must be numeric
* remote state from docstr
* protect numeric_state_expected
* Use try_parse_enum for custom class check
* Remove redundant type hints
---------
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-02-01 18:45:13 +01:00
Franck Nijhof
1edd00c51f
Allow any state class when using the precipitation device class ( #86977 )
2023-01-30 22:43:23 +01:00
Franck Nijhof
7ed9967245
Fix state classes for duration device class ( #86727 )
2023-01-26 17:26:52 +01:00
SgtBatten
0ccab19d2c
Add Mega Joule as valid unit of energy ( #86055 )
...
* Add Mega joule
* Reorder valid energy types
Alphabetical
* Add Mega Joule
* Add Mega Joule as valid energy unit
* Add Mega Joule
* Add Mega Joule as a Unit of Measurement to Energy
* Update tests
* Update tests
* Update number docstring
Co-authored-by: Roving Ronin <108674933+Roving-Ronin@users.noreply.github.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2023-01-25 14:13:42 +01:00
Erik Montnemery
f327a247a0
Allow a temperature sensor to be in K ( #86073 )
2023-01-25 11:47:52 +01:00
Erik Montnemery
14a32cd63b
Allow converting units of additional sensor device classes ( #86072 )
2023-01-17 09:35:53 +01:00
Franck Nijhof
0a367359f4
Add sensor state class validation for device classes ( #84402 )
...
Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-01-16 14:31:24 +01:00
Erik Montnemery
b0d4b73874
Add unitless unit converter ( #85694 )
...
* Add unitless unit converter
* Adjust type hints
* Adjust tests
* Rename to UnitlessRatioConverter
2023-01-12 09:20:00 +01:00
Erik Montnemery
54168c9bdb
Allow converting units of energy sensors ( #85497 )
2023-01-09 12:26:35 +01:00
Erik Montnemery
c1075ebb8c
Allow SensorDeviceClass.POWER_FACTOR unit None ( #85181 )
2023-01-05 11:03:37 +01:00
Erik Montnemery
8a0fb21988
Clarify SensorDeviceClass.PRECIPITATION docstring ( #85045 )
2023-01-03 11:30:03 +01:00
Franck Nijhof
6ecf2e8c71
Move sensor constants and define public names from this module ( #84973 )
2023-01-02 16:00:50 +01:00
Matthias Alphart
cd0ae66d58
Add CONF_STATE_CLASS to sensor/__init__.py
( #54106 )
...
* add CONF_STATE_CLASS to const.py
* move to `sensor/__init__.py`
* move to sensor/const.py
* Revert "move to sensor/const.py"
This reverts commit 604d0d066b
.
* move it to `sensor/const.py` but import it from `sensor/__init__.py`
* add Modbus
2021-08-27 05:54:50 +02:00