Commit Graph

9 Commits (992f9c3c6c3f63c2a9c2cca503414e009aa95c9e)

Author SHA1 Message Date
epenet 80b6195505
Add sensor setup type hints [m-n] (#63314)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-03 19:09:36 +01:00
epenet 2cc343bb7f
Use new enums in nws (#61947) 2021-12-16 15:43:15 +01: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
MatthewFlamm fb063928ce
Add device info to nws (#57153)
* Add base entity

* Use function for device_info

Multiple inheritance makes this tricky with a base class

* Device info in sensor

* Device info weather

* parantheses

* isort
2021-10-08 14:15:45 -05:00
Marc Mueller f5a543b220
Remove deprecated device_state_attributes (#55734) 2021-09-04 13:16:01 -07:00
Erik Montnemery 103e21c278
Move temperature conversions to sensor base class (5/8) (#54475) 2021-08-12 13:26:17 +02:00
Marc Mueller 3e08e50050
Use EntityDescription - nws (#53523)
* Use EntityDescription - nws

* Bugfix

* Bugfix 2
2021-07-27 01:46:01 +02:00
Marc Mueller d98e580c3c
Use NamedTuple - nws (#53293) 2021-07-21 22:24:07 -07:00
MatthewFlamm f8f0495319
Add nws sensor platform (#45027)
* Resolve rebase conflict.

Remove logging

* lint: fix elif after return

* fix attribution

* add tests for None valuea

* Remove Entity import

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Import SensorEntity

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* Inherit SensorEntity

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* remove unused logging

* Use CoordinatorEntity

* Use type instead of name.

* add all entities

* add nice rounding to temperature and humidity

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-04-01 18:50:37 +02:00