hass-core/tests/components/sensor
Erik Montnemery 086a6460ef
Allow customizing sensor state precision (#86074)
* Allow customizing sensor precision

* Don't convert integer strings to floats

* Tweak converting sensor state to number

* Drop default rounding to 2 decimals

* Adjust test

* Tweak rounding, improve test coverage

* Don't convert to a number if not necessary

* Raise if native_precision is set and state is not numeric

* Address review comments

* Address comments, simplify

* Don't call  property twice

* Make exception more helpful
2023-01-25 08:55:46 +01:00
..
__init__.py
test_device_condition.py Add device class moisture (#77666) 2022-09-01 11:47:47 -04:00
test_device_trigger.py Add device class moisture (#77666) 2022-09-01 11:47:47 -04:00
test_helpers.py Correct rest sensor configured to generate timestamps (#61429) 2021-12-10 09:59:27 -08:00
test_init.py Allow customizing sensor state precision (#86074) 2023-01-25 08:55:46 +01:00
test_recorder.py Add per-file-ignore to pylint (#86289) 2023-01-22 17:26:24 +01:00
test_significant_change.py Replace the usage of unit constants by enumerations in Tests [s-u] (#85937) 2023-01-16 09:00:27 +01:00
test_websocket_api.py Fix sensor test (#85740) 2023-01-12 12:21:19 +01:00