Commit graph

34 commits

Author SHA1 Message Date
epenet
c092f2be04
Use new unit enums in weather integrations (#82938) 2022-11-29 18:13:05 +01:00
epenet
1445e08090
Replace is_metric with is METRIC_SYSTEM (#80262) 2022-10-14 12:22:11 +02:00
Franck Nijhof
d6ceebbb68
Migrate Met.no to new entity naming style (#74908) 2022-07-10 13:13:22 -07:00
G Johansson
25a5ebe0c7
Met.no use native_* (#74259) 2022-06-30 10:47:29 -07:00
Franck Nijhof
af6953157f
Remove deprecated YAML configuration from Met.no (#69027) 2022-03-31 13:08:51 -07:00
Marc Mueller
830cc278d3
Improve CoordinatorEntity typing (#68441) 2022-03-21 10:22:30 +01:00
Marc Mueller
db4b69663f
Fix met TypeVar usage (#68152)
* Fix met TypeVar usage

* Change format_condition
2022-03-15 15:53:40 +01:00
Matt
fabc55cbc4
Added configuration_url to Met.no integration (#60378) 2021-11-26 00:14:55 +01:00
Ville Skyttä
053c456199
Change device entry type to an StrEnum (#59940)
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-11-22 18:14: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
carstenschroeder
63c9cfdbc8
Add type annotations for MET (#58804)
* Add Typing

* Add missing types

* define w/o Null

* specify # type: ignore
2021-11-01 19:37:03 +01:00
Robert Hillis
f2a5c4602e
Use DeviceInfo Class L-M (#58312) 2021-10-25 23:26:40 +02:00
Franck Nijhof
86212db71d
Merge of nested IF-IF cases - K-N (#48370) 2021-03-27 10:03:15 +01:00
Brian Rogers
e33405a8b0
Fix Met.no forecast precipitation (#44106) 2020-12-11 16:53:21 +01:00
Michael Thingnes
69c2818c56
Met.no: Fix for zero temp entries (#43684)
Addresses issue #43587
2020-11-27 08:07:49 +01:00
Paulus Schoutsen
dc1b1706f1
Add device info to met (#41611) 2020-10-10 17:30:27 +02:00
Michael Thingnes
bfbaa1e8bb
Validate Met.no forecast entries before passing them on to HA (#40400) 2020-09-21 21:56:08 +02:00
Michael Thingnes
83b0954e58
Fix Met.no missing conditions in API forecasts (#40373) 2020-09-20 23:56:04 +02:00
Franck Nijhof
b70df4ab18
Disable Met.no hourly weather by default (#39867)
Co-authored-by: Daniel Hjelseth Høyer <mail@dahoiv.net>
2020-09-10 07:58:40 +02:00
Michael Thingnes
0892acbabd
Met.no migrate from classic to complete endpoint (#39493) 2020-09-02 14:11:13 +02:00
J. Nick Koston
9d1045dd7a
Update met to use CoordinatorEntity (#39462) 2020-08-30 20:14:09 +02:00
Vaclav
8555e17eb9
Add hourly forecast to met.no (#38700)
* Add hourly forecast

* fix tests to assert for 2 entities created

* fix test to assert for 4 calls

* correct test tracking home number of calls

* fox tests

* fix test

* Apply suggestions from code review

* black

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-10 20:22:39 -05:00
Vaclav
b258e757c2
Add DataUpdateCoordinator to met integration (#38405)
* Add DataUpdateCoordinator to met integration

* isort

* redundant fetch_data

* Update homeassistant/components/met/weather.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/weather.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/weather.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/weather.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* Update homeassistant/components/met/weather.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>

* fix black, isort, flake8, hassfest, mypy

* remove unused async_setup method

* replace fetch_data by coordinator request_refresh

* remove redundant  async_update

* track_home

* Apply suggestions from code review

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update homeassistant/components/met/__init__.py

* Apply suggestions from code review

* Update test_config_flow.py

* Apply suggestions from code review

* Apply suggestions from code review

* Update __init__.py

* Create test_init.py

* Update homeassistant/components/met/__init__.py

* Update __init__.py

* Update __init__.py

* Update homeassistant/components/met/__init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 13:18:02 -05:00
Daniel Hjelseth Høyer
e53d770b3d
Update pymetno lib, and start using met api v2 (#38547) 2020-08-05 00:31:12 +02:00
Daniel Hjelseth Høyer
662d79eb86
Prevent unnecessary updates of met component (#38168) 2020-07-25 11:18:30 +02:00
MatthewFlamm
4e3b079a29
Add imperial units to met weather (#32824)
* add feet to meter conversion

* convert pressure and wind. fix wind for metric.

* dont convert wind speed in metric.

pymetno already converts it.

* add units to setup_platform constuctor
2020-03-16 11:04:47 +01:00
springstan
ba0aaeeddb
Use f-strings in integrations starting with "M" (#32271)
* Use f-strings in integrations starting with "M"

* Format mqtt light init with black

* Fix lint error

* Fix pylint error

* Restore constants

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Update homeassistant/components/mqtt/discovery.py

* Format with Black
2020-03-10 23:34:54 +01:00
Bas Nijholt
642655b6d7 Sort imports according to PEP8 for met (#29699) 2019-12-09 11:43:00 +01:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Daniel Høyer Iversen
dc89499116 Return correct name for met.no (#24763) 2019-06-25 13:09:04 -07:00
Paulus Schoutsen
f2962a0d16
Set up Met during onboarding (#24622)
* Set up Met during onboarding

* Lint

* Add pyMetNo to test reqs
2019-06-19 14:41:27 -07:00
Aaron Bach
a89c8eeabe
Add config entry for Met.no (#24608)
* Add config entry for Met.no

* Fixed tests
2019-06-18 17:44:41 -06:00
cgtobi
2c07bfb9e0 Remove dependencies and requirements (#23024)
* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit fe7171b4cd.

* Remove dependencies and requirements

* Revert "Remove dependencies and requirements"

This reverts commit 391355ee2c.

* Remove dependencies and requirements

* Fix flake8 complaints

* Fix more flake8 complaints

* Revert non-component removals
2019-04-12 10:13:30 -07:00
Paulus Schoutsen
f5076188ef
Consolidate all platforms that have no tests (#22096)
* Consolidate

* Fix tests

* Update imports

* Fix import

* Use importlib because integration and package share name

* Fix more tests

* Update .coveragerc and CODEOWNERS
2019-03-16 20:44:05 -07:00
Renamed from homeassistant/components/weather/met.py (Browse further)