Commit graph

3331 commits

Author SHA1 Message Date
GitHub Action
f58e1513e2 [ci skip] Translation update 2022-10-08 00:29:46 +00:00
Erik Montnemery
aa5575ba65
Only validate sensors in sensor.recorder.validate_statistics (#79749) 2022-10-06 21:17:46 +02:00
Erik Montnemery
0a59d37e62
Correct how unit used for statistics is determined (#79725) 2022-10-06 14:01:54 -04:00
GitHub Action
558b327928 [ci skip] Translation update 2022-10-06 00:31:54 +00:00
GitHub Action
8d28da83ca [ci skip] Translation update 2022-10-05 00:36:50 +00:00
Franck Nijhof
2b27cfdabb
Set system & entity integration types (#79593) 2022-10-04 10:36:42 -04:00
Erik Montnemery
e93deaa8aa
Simplify long term statistics by always supporting unit conversion (#79557) 2022-10-03 21:50:05 -04:00
GitHub Action
7eb101b0c7 [ci skip] Translation update 2022-10-04 00:37:13 +00:00
Erik Montnemery
a2e3978d53
Don't normalize units of long term statistics (#79320)
* Don't normalize units of long term statistics

* Update statistics.py
2022-10-03 21:42:44 +02:00
GitHub Action
12358f2446 [ci skip] Translation update 2022-10-03 00:31:05 +00:00
GitHub Action
13c8d22baf [ci skip] Translation update 2022-10-02 00:37:00 +00:00
Erik Montnemery
2de273500e
Remove state_unit_of_measurement from metadata DB table (#79370)
* Remove state_unit_of_measurement from metadata DB table

* Adjust test
2022-10-01 18:55:00 +02:00
GitHub Action
bd5ec4e198 [ci skip] Translation update 2022-10-01 00:40:08 +00:00
GitHub Action
21b078eeb7 [ci skip] Translation update 2022-09-30 00:42:29 +00:00
GitHub Action
63f2c4ab98 [ci skip] Translation update 2022-09-29 00:36:54 +00:00
epenet
f76eeaeea1
Adjust docstring for SensorDeviceClass.WEIGHT (#79201) 2022-09-28 09:03:18 -04:00
epenet
5438552d4a
Cleanup unit conversion (#79197)
* Move UNIT_RATIO to BaseUnitConverter

* Make UNIT_CONVERSION private

* Remove STATISTIC_UNIT_TO_UNIT_CLASS constant

* Cleanup websocket_api

* Imrpove valid_units check
2022-09-28 13:49:46 +02:00
epenet
5389ff3253
Add new weight device class (#79185) 2022-09-28 12:13:49 +02:00
Erik Montnemery
9084beda32
Keep storing statistics for sensors which change device class (#79155) 2022-09-27 14:33:28 -04:00
epenet
12e4d18038
Add volume to SensorDeviceClass (#77960)
* Add volume to SensorDeviceClass

* Adjust recorder

* Adjust tests

* Adjust sensor UNIT_CONVERTERS

* Adjust recorder

* Update strings.json
2022-09-27 19:37:52 +02:00
epenet
7c448416e1
Add speed to SensorDeviceClass (#77953)
* Add speed to SensorDeviceClass

* Adjust recorder

* Adjust tests

* Adjust sensor UNIT_CONVERTERS

* Add tests

* Add websocket tests

* Update strings.json
2022-09-27 17:19:34 +01:00
epenet
bfcc18e5b8
Add distance to SensorDeviceClass (#77951)
* Add distance to SensorDeviceClass

* Adjust recorder

* Adjust tests

* Adjust recorder

* Update __init__.py

* Update test_websocket_api.py

* Update test_websocket_api.py

* Update test_websocket_api.py

* Update strings.json

* Fix tests

* Adjust docstring
2022-09-27 15:34:00 +01:00
Erik Montnemery
5bcef1c7ce
Indicate in statistics issues when units can be converted (#79121) 2022-09-27 13:51:38 +02:00
epenet
c1bc26b413
Finish migration of recorder to unit conversion (#78985) 2022-09-25 21:14:18 -04:00
epenet
ddf56baf7a
Move temperature utility to unit_conversion (#78960) 2022-09-22 18:31:50 +02:00
epenet
c8491c4404
Move volume utility to unit_conversion (#78955)
* Move volume utility to unit_conversion

* Split tests
2022-09-22 17:49:45 +02:00
epenet
523d8d246b
Move pressure utility to unit_conversion (#78953) 2022-09-22 16:44:09 +02:00
epenet
0767cdd935
Move energy and power utilites to unit_conversion (#78950)
* Move energy and power utilites to unit_conversion

* Move tests
2022-09-22 15:39:49 +02: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
713fb874a8
Add NORMALISED_UNIT to UnitConverter (#78920)
* Add NORMALISED_UNIT to UnitConverter

* Adjust statistics

* Rename
2022-09-22 08:50:08 +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
ca78b1a77d
Add new energy utility (#78883)
* Add new energy utility

* Adjust STATISTIC_UNIT_TO_VALID_UNITS
2022-09-21 19:40:40 +02:00
epenet
d7382aadfe
Add new power utility (#78867)
* Add power utility

* Fix tests
2022-09-21 14:48:38 +02:00
epenet
64988521bb
Make use of generic EntityComponent (part 2) (#78494) 2022-09-17 18:18:53 +02:00
GitHub Action
ec258410c5 [ci skip] Translation update 2022-09-16 00:29:29 +00:00
Erik Montnemery
dd20a7ea62
Display statistics in the source's unit (#78031) 2022-09-15 12:01:24 -04:00
GitHub Action
955f3b7083 [ci skip] Translation update 2022-09-13 00:29:19 +00:00
epenet
7871a517a8
Import constants from root (#78271) 2022-09-12 18:53:05 +02:00
epenet
253d355526
Remove unused mypy ignore statements (#78292) 2022-09-12 09:25:11 -04:00
GitHub Action
718d4ac6cc [ci skip] Translation update 2022-09-09 00:28:55 +00:00
GitHub Action
4f7ad27b65 [ci skip] Translation update 2022-09-07 00:27:56 +00:00
GitHub Action
5c30b33ee2 [ci skip] Translation update 2022-09-06 00:27:55 +00:00
GitHub Action
c5100d2895 [ci skip] Translation update 2022-09-05 00:31:16 +00:00
GitHub Action
6921583410 [ci skip] Translation update 2022-09-04 00:28:06 +00:00
GitHub Action
945299dfb6 [ci skip] Translation update 2022-09-03 00:24:50 +00:00
GitHub Action
ccef03f1d4 [ci skip] Translation update 2022-09-02 00:25:46 +00:00
Ernst Klamer
db4391adff
Add device class moisture (#77666) 2022-09-01 11:47:47 -04:00
Erik Montnemery
008ac8d10d
Improve statistics metadata WS API (#77209) 2022-08-31 11:30:45 +02:00
Erik Montnemery
6b9c4c7ec1
Tweak comment about humidity sensors (#77482) 2022-08-29 09:57:40 -04:00
GitHub Action
ff3fd4c29d [ci skip] Translation update 2022-08-16 00:30:51 +00:00