Commit Graph

64 Commits (61a359e4d21140b7147abd006e07ee70689110b4)

Author SHA1 Message Date
Marc Mueller 32f3f46542
Add empty line after module docstring (2) [tests.components] (#112737) 2024-03-08 19:16:21 +01:00
Joost Lekkerkerker 7ad1d3e891
Add icon translations to DSMR (#111411)
* Add icon translations to DSMR

* Add icon translations to DSMR
2024-02-28 12:55:43 +01:00
dupondje 0aaa517217
add missing state class to dsmr sensors (#110712)
current_average_demand and maximum_demand_current_month are missing a state class, which gives errors in the statistics tab in HA.
So adding them to the sensor.
2024-02-16 12:08:09 +01:00
Jan Bouwhuis 5d6791e412
Remove CONF_PRECISION remainder from dsmr (#104919) 2023-12-03 11:53:09 +01:00
Jan Bouwhuis 5106dd173c
Fix dsmr zero reconnect interval option could crash HA (#104900)
* Fix dsmr zero interval option could crash HA

* No change change the options
2023-12-02 19:28:56 +01:00
Jan Bouwhuis 7767bb328d
Filter out zero readings for DSMR enery sensors (#104843) 2023-11-30 23:42:51 +01:00
dupondje ba481001c3
Add support for multiple mbus devices in dsmr (#84097)
* Add support for multiple mbus devices in dsmr

A dsmr meter can have 4 mbus devices.
Support them all and also add support for a water meter on the mbus
device.

* Apply suggestions from code review

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Rewrite old gas sensor to new mbus sensor

* No force updates + fix mbus entity unique_id

* Remove old gas device

* Add additional tests

* Fix remarks from last review + move migrated 5b gas meter to new device_id

* Fix ruff error

* Last fixes

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-11-29 15:41:58 +01:00
Jan-Philipp Benecke 81450f0117
Update d-e* tests to use entity & device registry fixtures (#103804) 2023-11-12 10:38:32 +01:00
dupondje 4f11ee6e0b
Fix 5B Gas meter in dsmr (#103506)
* Fix 5B Gas meter in dsmr

In commit 1b73219 the gas meter broke for 5B.
As the change can't be reverted easily without removing the peak usage
sensors, we implement a workaround.

The first MBUS_METER_READING2 value will contain the gas meter data just
like the previous BELGIUM_5MIN_GAS_METER_READING did.
But this without the need to touch dsmr_parser (version).

Fixes: #103306, #103293

* Use parametrize

* Apply suggestions from code review

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>

* Add additional tests + typo fix

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2023-11-08 09:13:51 +01:00
dupondje da653c36fd
Add peak usage sensors to dsmr (#102227) 2023-10-20 15:59:34 +02:00
Jan Bouwhuis 9db9f1b8a9
Fix suggested UOM cannot be set for dsmr entities (#102134)
* Supply dsmr entities jit on first telegram

* Stale docstr

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>

* Simplify tuple type

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-10-19 19:22:03 +02:00
dupondje 1b73219137
Bump dsmr_parser to 1.3.0 (#102225)
bump dsmr_parser==1.3.0
2023-10-18 18:13:09 +02:00
Joakim Plate ae7930c0ad
Use entity translation in dsmr (#93017)
* Use entity translation in dsmr

* Combine a few strings
2023-05-17 22:31:04 +02:00
epenet 728f62b1ec
Add type hints to integration tests (part 5) (#87850) 2023-02-12 19:39:48 +01:00
Michael 2850583085
Replace the usage of unit constants by enumerations in Tests [a-e] (#85932) 2023-01-15 14:44:01 +01:00
Franck Nijhof 4a48f0d659
Fix device class for DSMR gas sensors providing energy readings (#85202) 2023-01-05 20:28:13 +01:00
Franck Nijhof 02f64ada2d
Only reflect unavailable state in DSMR when disconnected (#84862)
* Only reflect unavailable state in DSMR when disonnected

* Addressreview comment
2022-12-30 13:08:11 -05:00
Franck Nijhof 1b3d3d5cc3
Add availability property to DSMR sensors (#84848) 2022-12-30 16:21:41 +01:00
Jelte Zeilstra 298ea3ff46
Add enum device class and translations to DSMR Active tariff sensor (#84253) 2022-12-21 23:26:56 +01:00
Franck Nijhof b62ebbe974
Migrate DSMR to new entity naming style (#75077) 2022-07-20 11:30:08 +02:00
Franck Nijhof 397f94ee50
Migrate DSMR to use keys for entity unique ID (#74895) 2022-07-12 20:06:13 +02:00
Franck Nijhof 99f68ab858
Update dsmr_parser to v0.33 (#71946) 2022-05-16 21:04:59 -07:00
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
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
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
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