Commit Graph

75 Commits (b07e9df308a2fec26d76ee0ae046c5699d0546d1)

Author SHA1 Message Date
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
Marc Mueller c82933175d
Use builtin TimeoutError [a-d] (#109678) 2024-02-05 11:31:33 +01:00
Jan Bouwhuis 5d6791e412
Remove CONF_PRECISION remainder from dsmr (#104919) 2023-12-03 11:53:09 +01:00
Jan Bouwhuis c9306049b3
Correct SerialException import in dsmr, firmata, landysgyr_heat_meater and rfxtrx integrations (#104889)
* Fix SerialException import in dsmr integration

* Fix imports firmata, landysgyr_heat_meter, rfxtrx
2023-12-02 19:30:04 +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
Joost Lekkerkerker b636a4d5cf
Parametrize DSMR serial config flow tests (#103524) 2023-11-07 14:13:57 +01:00
dupondje 91182603d5
Use right equipment identifier in DSMR setup (#103494) 2023-11-06 14:19:47 +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
Franck Nijhof ed79265843
Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
epenet 728f62b1ec
Add type hints to integration tests (part 5) (#87850) 2023-02-12 19:39:48 +01:00
epenet 3052de3e8e
Add type hints to integration tests (d-e) (#87699) 2023-02-08 13:01:44 +01:00
epenet 4142f0d15d
Add return type to tests without arguments (#87613)
* Add return type to tests without arguments

* Black

* Cancel fixture amends
2023-02-07 14:20:06 +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 7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum (#74642) 2022-07-07 19:57:36 +03: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
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