Commit Graph

9 Commits (3351846b0eb955fbd182982bd86a90f0869448e9)

Author SHA1 Message Date
G Johansson 4cf0f9b197
Fix incorrect deprecation year for conversion utils (#80195)
Fix incorrect depr year
2022-10-13 00:06:23 +02:00
epenet b649ef8d87
Realign util constants with 2022.9.7 (#79357) 2022-09-30 14:38:11 -04:00
epenet 9c3b40dad1
Deprecate conversion utilities (#78957)
* Deprecate utilities

* Deprecate distance and speed

* Add tests

* Adjust pylint

* Simplify temperature deprecation
2022-09-28 19:39:44 +02: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 4200778eaf
Move distance and speed util to unit_conversion (#78967) 2022-09-23 08:23:59 -04:00
epenet 9490771a87
Refactor distance, speed and volume utils (#77952)
* Refactor distance util

* Fix bmw connected drive tests

* Adjust here travel time tests

* Adjust waze travel time tests

* Adjust test_distance

* Adjust rounding values

* Adjust more tests

* Adjust volume conversions

* Add tests
2022-09-07 16:18:00 +02:00
Erik Montnemery d3f4108a91
Support knots and ft/s in weather wind speed (#74175) 2022-06-29 16:34:41 +02:00
Erik Montnemery c186a73e57
Tweak speed util (#74160) 2022-06-29 12:01:09 +02:00
rianadon a102c425a9
Add speed conversion function & add speed to units system (#53846)
* Add speed conversion function

* Add test for speed utility functions

* Update unit system tests

* Fix incorrect unit conversions in tests

* Fix some test errors

* Calculate speed units from smaller set of constants

* Fix typo in speed test

* Use pytest.approx for checking floating point values

* Change other instance of speeds needing to be pytest.approx

* Revert changes to unit system

* Fix oopsie in defining in/day and in/hr

* Parametrize test

* Add comments describing calculations & remove duplicate test
2021-11-09 08:12:28 +01:00