Commit Graph

61 Commits (cb37df6a619afc167ae758796b8cd980d8e0ee39)

Author SHA1 Message Date
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
Franck Nijhof 27e69037d4
Use entity descriptions classes in DSMR (#53549) 2021-07-27 14:44:58 +02:00
Franck Nijhof 3b0f67acd1
DSMR: Add deprecation warning for YAML configuration (#52179) 2021-06-25 14:42:06 +02:00
Franck Nijhof a2be9a487f
DSMR: Complete full strictly typed (#52162) 2021-06-24 11:27:25 -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 75c3daa45f
DSMR: Refactor sensor creation, added typing to sensors (#52153)
* DSMR: Refactor sensor creation, added typing to sensors

* Log from package level

* Apply suggestions from code review

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

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-06-24 16:56:43 +02:00
Franck Nijhof afa00b7626
DSMR: Remove Gas derivative sensor (#52147) 2021-06-24 14:25:38 +02:00
Franck Nijhof 17357bf575
DSMR: Small cleanup; use entity class attributes (#52143) 2021-06-24 11:25:19 +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
Milan Meulemans 29d72714f3
Replace dict with DeviceInfo (#49950)
* Replace dict with DeviceInfo

* Clean up

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-05-02 00:37:19 +02:00
Ville Skyttä 631ab367e2
Fix typing.Any spelling (#49673) 2021-04-25 09:36:21 -10:00
Franck Nijhof 006bcde435
Remove HomeAssistantType alias - Part 3 (#49339) 2021-04-17 12:48:03 +02:00
Franck Nijhof 6932cf9534
Use contextlib.suppress where possible (#48189) 2021-03-23 14:36:43 +01:00
Erik Montnemery 23b562386f
Migrate integrations d-e to extend SensorEntity (#48211) 2021-03-22 12:52:29 +01:00
Marc Mueller 7c0734bdd5
Update typing 05 (#48038) 2021-03-17 23:43:55 +01:00
Rob Bierbooms 1244fb4152
Bump dsmr_parser to 0.28, configure keep_alive_interval (#46464) 2021-02-13 13:19:38 +01:00
Joeri 2811e39c5c
Add entity specific force_update for DSMR (#46111) 2021-02-08 15:18:36 +01:00
Paulus Schoutsen a2ca08905f
Guard unbound var for DSMR (#44673) 2021-01-02 01:34:10 +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
Rob Bierbooms 1fe93b4ec9
Remove setting log level of dsmr_parser inside dsmr integration (#43059) 2020-11-10 22:13:26 +01:00
Rob Bierbooms f470d1e28d
Enable polling for DSMR derivative entity (#42524) 2020-10-30 09:11:25 +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 be431ce12a
Set should_poll property for DSMR integration (#42108) 2020-10-20 12:14:09 +02:00
wouterbaake 1363fbb02a
Set force_update property for DSMR integration (#42086) 2020-10-20 09:45:43 +02:00
Rob Bierbooms 7f7a0003c7
Address review comments on dsmr update to ConfigEntry (#39662) 2020-09-04 20:56:22 +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
Paulus Schoutsen cfaa851b5b
Revert DSMR not calling entity methods (#36179) 2020-05-26 22:11:40 -07:00
Paulus Schoutsen aef06a3544
Directly call write state 2 (#33513)
* Directly call async_write_ha_state pt2

* Directly call async_write_ha_state pt2

* Fix mock

* Address comments
2020-04-03 09:34:50 +02: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