core/homeassistant/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
..
translations [ci skip] Translation update 2023-01-19 00:25:04 +00:00
__init__.py Allow customizing sensor state precision (#86074) 2023-01-25 08:55:46 +01:00
const.py Allow converting units of additional sensor device classes (#86072) 2023-01-17 09:35:53 +01:00
device_condition.py
device_trigger.py
group.py
helpers.py
manifest.json
recorder.py Add unitless unit converter (#85694) 2023-01-12 09:20:00 +01:00
significant_change.py
strings.json
websocket_api.py Add WS command sensor/device_class_convertible_units (#85213) 2023-01-12 09:31:06 +01:00