Commit graph

17 commits

Author SHA1 Message Date
Erik Montnemery
68e2809c36
Modernize nws weather (#98748) 2023-08-22 10:01:17 +02:00
Erik Montnemery
827e06a5c8
Improve typing of nws (#98485)
* Improve typing of nws

* Address review comments
2023-08-16 20:21:07 +02:00
karwosts
9e7872e78b
Fix NWS twice_daily forecast day/night detection (#97703) 2023-08-03 21:15:08 +02:00
MatthewFlamm
c06bc28434
Limit observations requested for NWS (#90137)
* fetch data only for 70 minutes

* Use timezone aware now

* Type hint

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2023-03-29 10:34:29 +02:00
Sean Chen
c3c9ed6835
Improve type hints in nws (#83173) 2023-01-16 22:19:11 +01:00
Sean Chen
985c1b31e1
Use new device class in nws (#83172)
* Replace unit consts with enums

* Remove default entries in NWSSensorEntityDescription

* Replace wind icon property with setting device_class in Wind Speed and Wind Gust sensors
2022-12-06 13:27:58 +01:00
epenet
2cc343bb7f
Use new enums in nws (#61947) 2021-12-16 15:43:15 +01:00
MatthewFlamm
8bc8081e81
Add state_class_measurement to nws (#56629) 2021-09-25 11:58:07 +02: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
MatthewFlamm
7a401d3d5d
Fix missing condition in nws (#46513) 2021-02-13 17:35:57 -10:00
MatthewFlamm
958c9c08d6
Use more homeassistant constants in NWS (#39690) 2020-09-05 21:11:15 +02:00
MatthewFlamm
64cd38d96f
Use DataUpdateCoordinator in NWS (#34372) 2020-04-18 08:59:20 -05:00
MatthewFlamm
6d812bd957
Add config flow to nws and remove yaml configuration (#34267)
* add config flow to nws and remove yaml

* Don't duplicate scan_time

Co-Authored-By: J. Nick Koston <nick@koston.org>

* Use _abort_if_unique_id_configured

Co-Authored-By: J. Nick Koston <nick@koston.org>

* fix abort

* Add unavailable tests

* update and use better strings

* lint

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-16 09:15:55 -05:00
MatthewFlamm
a3e84791c6
Convert nws integration to component configuration (#31398)
* convert nws to component configuration

* add more debug logging

* remove assumed state

* move initialization of data into init

* refactor update logic

* use forecast success for checking available entities

* Split unique_id into more usable pieces.

use a base_unique_id for each entry.  Add domain for signaling to entities.  Each entity in each platform can use base_unique_id to form individual unique_id's.

* Revert "move initialization of data into init"

This reverts commit 09eb0220469285b10f0500f5f6def67415931a81.

* add silver quality scale to manifest

* unsubscribe listener in will_remove_from_hass

* initialize _unsub_listener in __init__

* use async_on_remove

* remove scan interval from configuration

* Use better name

Co-Authored-By: J. Nick Koston <nick@koston.org>

Co-authored-by: J. Nick Koston <nick@koston.org>
2020-04-08 10:22:25 -05:00