1
mirror of https://github.com/home-assistant/core synced 2024-09-18 19:55:20 +02:00
Commit Graph

46 Commits

Author SHA1 Message Date
rhpijnacker
0c2b5b6c12
Support DSMR data read via RFXtrx with integrated P1 reader (#63529)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-26 16:46:33 +01:00
rhpijnacker
bb762d5b0f
100% code coverage for config_flow of dsmr component (#65238) 2022-02-07 10:48:33 +01:00
Gunnar Klauberg
0f2e2aef2f
Add DSMR config options for EasyMeter/Q3D (#63669)
Co-authored-by: Rob Bierbooms <mail@robbierbooms.nl>
2022-01-10 13:08:41 +01:00
rhpijnacker
32c416b646
Bump dsmr-parser dependency to 0.32 (#63436) 2022-01-05 22:50:00 +01:00
Franck Nijhof
5efb88f3f1
Remove deprecated YAML configuration from DSMR (#61008) 2021-12-05 17:09:37 +01:00
Franck Nijhof
58fdcfb6b8
Use device/state class enums in DSMR (#60791) 2021-12-01 22:15:17 -05:00
Paulus Schoutsen
a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
Erik Montnemery
32a2c5d5db
Add support for Swedish smart electricity meters to DSMR (#54630)
* Add support for Swedish smart electricity meters to DSMR

* Use Swedish protocol support from dsmr_parser

* Update tests

* Bump dsmr_parser to 0.30

* Remove last_reset attribute from Swedish energy sensors
2021-08-19 10:11:20 +02:00
Erik Montnemery
c74f9a8313
Remove stale references to last_reset (#54838)
* Remove stale references to last_reset

* Update tests
2021-08-18 21:47:57 +02:00
Franck Nijhof
9dab920d01
DSMR: Remove icon from sensors with gas device class (#54752) 2021-08-17 14:26:02 +02:00
Erik Montnemery
35389a6d28
Remove last_reset attribute from dsmr sensors (#54699) 2021-08-16 18:35:50 +02:00
Bram Kragten
e23750b2a4
Add device class gas and enable statistics for it (#54110)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-08-11 09:58:19 -07:00
Franck Nijhof
34a317b847
DSMR: Device/state classes, icons, less common disabled by default (#52159) 2021-06-24 18:48:51 +02:00
Franck Nijhof
afa00b7626
DSMR: Remove Gas derivative sensor (#52147) 2021-06-24 14:25:38 +02:00
Franck Nijhof
fbdd6a9d95
DSMR: Typing cleanup in init & config flow (#52145) 2021-06-24 12:53:16 +02:00
Rob Bierbooms
aa56a21b45
Add config flow step user to dsmr (#50318)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-06-24 10:16:08 +02:00
Ville Skyttä
19d25cd901
Change config entry state to an enum (#49654)
* Change config entry state to an enum

* Allow but deprecate EntryState str equality comparison

* Test fixes

* Rename to ConfigEntryState

* Remove str comparability backcompat

* Update new occurrences of strs cropped up during review
2021-05-20 19:19:20 +02:00
Franck Nijhof
6ec3234ccc
Clean up superfluous integration setup - part 2 (#48478) 2021-03-29 13:23:07 -10:00
Erik Montnemery
87e7cebd36
Update tests c-h to use registry async_get (#47652) 2021-03-09 14:31:17 +01:00
Joeri
2811e39c5c
Add entity specific force_update for DSMR (#46111) 2021-02-08 15:18:36 +01:00
Franck Nijhof
65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Rob Bierbooms
9531b08f2a
Add explicit support for Luxembourg Smarty meter in dsmr integration (#43975)
* Add support for Luxembourg Smarty meter

* Add config flow test

* Add sensor tests
2020-12-27 09:39:36 +01:00
Rob Bierbooms
930866bad5
Add MIN_TIME_BETWEEN_UPDATES to dsmr integration (#43057) 2020-11-11 09:21:07 +01:00
springstan
30b94892c4
Use strings instead of f-strings for constants (#40619) 2020-11-09 10:09:53 +01:00
Rob Bierbooms
79fac17c28
Add unique_id and device_info to DSMR entities (#42279)
* Add unique ids and device info

* Fix tests

* Add tests

* Apply suggestions from code review

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

* Fix black

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-10-24 06:22:23 -05:00
Rob Bierbooms
e97792adf0
Refactor dsmr tests (#39724) 2020-10-04 14:27:22 +02:00
Rob Bierbooms
8567fe94e1
Add connection validation on import for dsmr integration (#39664) 2020-09-05 12:05:46 +02:00
Rob Bierbooms
d0120d5e0a
Update DSMR integration to import yaml to ConfigEntry (#39473)
* Rewrite to import from platform setup

* Add config flow for import

* Implement reload

* Update sensor tests

* Add config flow tests

* Remove some code

* Fix pylint issue

* Remove update options code

* Add platform import test

* Remove infinite while loop

* Move async_setup_platform

* Check for unload_ok

* Remove commented out test code

* Implement function to check on host/port already existing

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

* Implement new method in import

* Update tests

* Fix test setup platform

* Add string

* Patch setup_platform

* Add block till done to patch block

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-09-03 16:19:45 -05:00
Ville Skyttä
6ae9399237
Upgrade isort to 5.4.2 (#37939) 2020-08-29 08:23:55 +02:00
Pascal Vizeli
c291d4aa7d
Intelligent timeout handler for setup/bootstrap (#38329)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-08-05 14:58:19 +02:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background (#36244)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Paulus Schoutsen
2af984917e
Use asynctest-mock in most places (#35109)
* Use asynctest-mock in most places

* Fix broken patch in pilight
2020-05-03 11:27:19 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
springstan
02c9e47db8
Use ENERGY_KILO_WATT_HOUR constant (#33962) 2020-04-10 20:21:29 +02:00
Ziv
c3c7b68cac
Fix unhandled exceptions in dsmr (#33601)
* reordered the clearing of the closed Event so it can stay set at the end and not
leave a task waiting on close

* fixed the side effect so it returns one TimeoutError and after that success
Previously it reached the end of the single item list and threw an exception

* fixed the error. it doesn't happen on python 3.7.5 but CI is on 3.7.0

* fixed comment
2020-04-04 14:38:20 -07:00
dupondje
f26826d949
Fix DSMR 5 (#32233)
DSMR 5 was broken because some wrong if.
if dsmr_version in ("5B"):
-> this checks dsmr_version against 5 and B. Not if its 5B.
2020-02-26 17:02:42 -08:00
Ville Skyttä
496bd3dddf
Add and use more unit constants (#32122)
* Add and use speed constants

* Add and use meter based volume and area constants

* Add and use more mass unit constants

* Add and use concentration unit constants

* Add and use watts per square meter constant

* Use more time constants

* Use more data constants
2020-02-24 17:52:14 -08:00
springstan
a85808e325
Add and use time related constants (#32065)
* Add and use time related constants

* Sort time constants and reuse them in data rate constants

* Fix greeneyemonitor import

* Fix greeneyemonitor import V2

* Fix failing here_travel_time test

* Add TIME_MONTHS and TIME_YEARS

* Use TIME_MINUTES in opentherm_gw and isy994

* Add and use TIME_MILLISECONDS

* Change inconsistent ones

* Add TIME_MICROSECONDS and TIME_WEEKS

* Use constants in apcupsd and travisci

* Fix import error in upnp sensor.py

* Fix isy994 sensor.py using TIME_YEARS

* Fix dyson tests

* Use TIME_SECONDS in more places

* Use TIME_DAYS in google wifi
2020-02-23 22:09:24 +02:00
dupondje
557f5763df
Add belgian meter and rename some dsmr sensors (#30121)
* Add support for belgian meter and rename some sensors

* DSMR Fixes

* Add test

* More tests

* Adjust test to latest dev

* Remove unused code

* Depend on dsmr_parser 0.18
2020-02-05 22:14:03 +01:00
Franck Nijhof
fd4f8d92d2
Upgrade dsmr_parser to 0.18, re-enable tests (#31256) 2020-01-28 23:35:28 +01:00
Franck Nijhof
050e4afdc0
Disable failing dsmr tests (#31202)
* Disable failing dsmr tests

* Disable module, disable import of missing dep
2020-01-27 11:13:36 +01:00
Franck Nijhof
30dbed3f98 Migrate dsmr tests from coroutine to async/await (#30333) 2019-12-31 21:03:21 +01:00
Diefferson Koderer Môro
04dbe5bc84 Move imports in dsmr component (#27974)
* Move imports in dsmr component

* Review

* Fix tests
2019-10-22 18:50:49 +02:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Paulus Schoutsen
f995ab9d54
Don't pass in loop (#23984)
* Don't pass in loop

* Revert some changes

* Lint + Axis revert

* reinstate loop

* Fix a test

* Set loop

* Update camera.py

* Lint
2019-05-22 21:09:59 -07:00
Penny Wood
f195ecca4b Consolidate all platforms that have tests (#22109)
* Moved climate components with tests into platform dirs.

* Updated tests from climate component.

* Moved binary_sensor components with tests into platform dirs.

* Updated tests from binary_sensor component.

* Moved calendar components with tests into platform dirs.

* Updated tests from calendar component.

* Moved camera components with tests into platform dirs.

* Updated tests from camera component.

* Moved cover components with tests into platform dirs.

* Updated tests from cover component.

* Moved device_tracker components with tests into platform dirs.

* Updated tests from device_tracker component.

* Moved fan components with tests into platform dirs.

* Updated tests from fan component.

* Moved geo_location components with tests into platform dirs.

* Updated tests from geo_location component.

* Moved image_processing components with tests into platform dirs.

* Updated tests from image_processing component.

* Moved light components with tests into platform dirs.

* Updated tests from light component.

* Moved lock components with tests into platform dirs.

* Moved media_player components with tests into platform dirs.

* Updated tests from media_player component.

* Moved scene components with tests into platform dirs.

* Moved sensor components with tests into platform dirs.

* Updated tests from sensor component.

* Moved switch components with tests into platform dirs.

* Updated tests from sensor component.

* Moved vacuum components with tests into platform dirs.

* Updated tests from vacuum component.

* Moved weather components with tests into platform dirs.

* Fixed __init__.py files

* Fixes for stuff moved as part of this branch.

* Fix stuff needed to merge with balloob's branch.

* Formatting issues.

* Missing __init__.py files.

* Fix-ups

* Fixup

* Regenerated requirements.

* Linting errors fixed.

* Fixed more broken tests.

* Missing init files.

* Fix broken tests.

* More broken tests

* There seems to be a thread race condition.
I suspect the logger stuff is running in another thread, which means waiting until the aio loop is done is missing the log messages.
Used sleep instead because that allows the logger thread to run. I think the api_streams sensor might not be thread safe.

* Disabled tests, will remove sensor in #22147

* Updated coverage and codeowners.
2019-03-18 23:07:39 -07:00