Commit Graph

90 Commits (fce869248cbb902aeece2ca7b469a2e90d7fdd3d)

Author SHA1 Message Date
Erik Montnemery 0c2485bc03
Freeze integration entity descriptions (#105984)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-12-18 16:28:13 -10:00
Joost Lekkerkerker a82410d5e9
Deduplicate constants E-Z (#105657) 2023-12-13 17:05:37 +01:00
dupondje db9d6b401a
Add optional dsmr timestamp sensor (#104979)
* Add optional timestamp sensor

* Apply suggestions from code review

Remove "timestamp" translation

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2023-12-05 14:28:57 +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
Jan Bouwhuis 04f1b11ef7
Debug level logging for DSMR migration code (#104757) 2023-11-30 00:32:12 +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
Aarni Koskela 706add4a57
Switch formatting from black to ruff-format (#102893)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-27 14:38:59 +01:00
gigatexel 86f87262ed
Remove force_update from all DSMR entities (#104037)
Remove force_update
2023-11-16 08:59:29 +01:00
Franck Nijhof ce1e6ce006
Remove DSMR entity descriptions required fields mixins (#104002) 2023-11-14 21:48:01 -05: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 870e38e8ba
Remove unused dsmr sensors (#102223) 2023-10-19 08:57:50 +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
dupondje 43aaf78f7b
Fix DSMR max current device class (#102219)
Max current is CURRENT Device Class

The max current is shown as Amps. So need to change the device class to
CURRENT instead of POWER.
2023-10-18 14:05:16 +02:00
Erik Montnemery d1afcd773f
Revert "Cache entity properties that are never expected to change in the base class" (#100422)
Revert "Cache entity properties that are never expected to change in the base class (#95315)"

This reverts commit 042776ebb8.
2023-09-15 11:25:24 +02:00
J. Nick Koston 042776ebb8
Cache entity properties that are never expected to change in the base class (#95315) 2023-09-14 17:48:48 -05:00
Ville Skyttä 3b4774d9ed
Remove unnnecessary pylint configs from components/[a-d]* (#98911) 2023-08-24 00:54:02 +02:00
Erik Montnemery 045c327928
Move DeviceInfo from entity to device registry (#98149)
* Move DeviceInfo from entity to device registry

* Update integrations
2023-08-10 22:04:26 -04:00
Marc Mueller 9e67bccb89
Replace EventType annotations with Event (#96426) 2023-07-18 08:51:06 +02:00
Franck Nijhof 3e85a29b86
Move overlapping pylint rules to ruff, disable mypy overlap (#94359) 2023-06-27 17:42:46 +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
Erik Montnemery cc564026fa
Move EntityCategory to homeassistant.const (#87792)
* Move EntityCategory to homeassistant.const

* Fix more imports
2023-02-09 20:15:37 +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
epenet 456c5515c8
Use UnitOfVolume in integrations (#83646) 2022-12-10 12:43:13 +01:00
Joakim Plate 8bd4125390
Test corrections noticed during pytest upgrade (#82579)
* Withing trigger a call to coordinator after init

* Stop discovery task on STOP event

* Stop dsmr connection task on STOP

* Use autospec in modem_serial tests

close on AioSerial is non async, and should not be mocked as a coroutine

* Make sure responder is specced correctly

tests/components/emulated_hue/test_init.py::test_setup_works
  /Users/joakim/src/hass/home-assistant/homeassistant/components/emulated_hue/__init__.py:119: RuntimeWarning: coroutine 'AsyncMockMixin._execute_mock_call' was never awaited
    protocol.close()

* Don't assume Pymodbus is the only thing logging

* Use gather instead of wait

```
homeassistant/components/homeassistant/__init__.py:208: DeprecationWarning: The explicit passing of coroutine objects to asyncio.wait() is deprecated since Python 3.8, and scheduled for removal in Python 3.11.
```

* Increase wait time for automation tests

Assuming exit within 1 seconds is unreasonable on a potentially loaded
test machine.

* Avoid changing app state after startup
2022-11-23 20:53:28 +01:00
Marc Mueller c899e72029
Code quality improvements for `dsmr` (#82443) 2022-11-21 10:13:22 +01:00
Franck Nijhof 16e75f2a13
Fix incorrect sensor key in DSMR (#75865) 2022-07-28 18:15:27 +02: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 3a61a0de2e
Standardize EntityDescription in DSMR (#74671) 2022-07-07 22:38:10 +02: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
gigatexel a9c383a1e5
Correct naming for electrical energy meter (#68290) 2022-03-17 18:50:18 +01:00
Franck Nijhof 5efb88f3f1
Remove deprecated YAML configuration from DSMR (#61008) 2021-12-05 17:09:37 +01:00
Marc Mueller e0c0d00833
Use assignment expressions 39 (#58829) 2021-10-31 18:56:25 +01:00
Robert Hillis fc3e7f5b7e
Use DeviceInfo Class D (#58218) 2021-10-22 17:00:00 +02:00
Erik Montnemery 7e9f8de7e0
Fix exception when shutting down DSMR (#55441)
* Fix exception when shutting down DSMR

* Update homeassistant/components/dsmr/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-08-30 12:08:21 +02:00
Erik Montnemery ee009cc332
Fix DSMR startup logic (#55051) 2021-08-23 12:32:57 +02:00
Erik Montnemery e134246cbd
Improve DSMR shutdown (#54922) 2021-08-20 15:54:05 +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
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
Erik Montnemery 41f3c2766c
Move temperature conversions to entity base class (2/8) (#54468) 2021-08-11 18:57:12 +02:00
Emilv2 1012d823a0
Fix missing default reconnect interval in dsmr (#53760) 2021-08-02 14:54:33 +02:00
Franck Nijhof 390101720d
Fix DSMR reconnecting loop without timeout (#53722) 2021-07-29 22:55:26 +02:00