Commit Graph

88 Commits (7e11fec761dcdc108cd8e355c4f19d1a79d50270)

Author SHA1 Message Date
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02:00
Joost Lekkerkerker 906d3198e3
Use is in enum comparison in config flow tests F-J (#114670)
* Use right enum expression F-J

* Fix
2024-04-02 23:01:37 +02:00
Duco Sebel 788813aad6
Implement Identify button and Cloud connection toggle for HomeWizard Watermeter (#113814) 2024-03-26 10:34:36 +01:00
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00
Duco Sebel cad3be8213
Add new HomeWizard Energy Socket to tests (#113406) 2024-03-22 16:48:27 +01:00
Duco Sebel 48553ece68
Remember entered IP when error happend while setting up HomeWizard (#113815) 2024-03-22 16:10:03 +01:00
Erik Montnemery 426f73b1f4
Add State.last_reported (#113511)
* Add State.last_reported

* Update tests

* Update test snapshots

* Call state_reported listeners when firing state_changed event

* Add tests
2024-03-20 21:05:07 +01:00
Marc Mueller c88b337600
Add empty line after module docstring [tests f-k] (#112709) 2024-03-08 14:50:04 +01:00
J. Nick Koston a6b17dbe68
Schedule polling as periodic tasks (#112640)
* Schedule periodic coordinator updates as background tasks.

Currently, the coordinator's periodic refreshes delay startup because they are not scheduled as background tasks. We will wait if the startup takes long enough for the first planned refresh. Another coordinator's scheduled refresh will be fired on busy systems, further delaying the startup. This chain of events results in the startup taking a long time and hitting the safety timeout because too many coordinators are refreshing.

This case can also happen with scheduled entity refreshes, but it's less common. A future PR will address that case.

* periodic_tasks

* periodic_tasks

* periodic_tasks

* merge

* merge

* merge

* merge

* merge

* fix test that call the sync api from async

* one more place

* cannot chain

* async_run_periodic_hass_job

* sun and pattern time changes from automations also block startup

* Revert "sun and pattern time changes from automations also block startup"

This reverts commit 6de2defa05.

* make sure polling is cancelled when config entry is unloaded

* Revert "Revert "sun and pattern time changes from automations also block startup""

This reverts commit e8f12aad55.

* remove DisabledError from homewizard test as it relies on a race

* fix race

* direct coverage
2024-03-07 23:32:26 -05:00
Franck Nijhof e0a9dcd996
Add label registry (#110821) 2024-02-19 11:59:08 +01:00
Marc Mueller 46f8fb3ac1
Use builtin TimeoutError [misc] (#109703) 2024-02-05 18:45:16 +01:00
Duco Sebel 41fdcce226
Bumb python-homewizard-energy to 4.3.0 (#109131) 2024-01-31 01:50:00 +01:00
Duco Sebel d631cad07f
Add new sensors exposed by HomeWizard kWh meter (#108850)
* Add new sensors exposed by kWh meter

* Add entity translation placeholders

* Fix Mypy issue

* Adjusts tests

* Remove suggested display precision for disabled-by-default sensors

* Update test-snapshots

* Update snapshots
2024-01-29 14:42:16 +01:00
Duco Sebel dbc568cd53
Simplify HomeWizard sensor names (#108854)
* Simplify HomeWizard sensor names

* Simplify translations even more by using default device_class names
2024-01-29 13:24:00 +01:00
Duco Sebel 1fa7ceede3
Use entity translations placeholders in HomeWizard (#108741)
* Adopt Entity placeholders

* Undo some snapshot changes
2024-01-25 13:15:20 +01:00
Duco Sebel 0c9a30ab69
Add support for externally connected utility devices in HomeWizard (#100684)
* Backport code from #86386

* Add tests

* Remove local dev change

* Implement device class validation based on unit

* Swap sensor and externalsensor classes (based on importance)

* Use translations for external sensor entities

* Re-add meter identifier as sensor for external devices

* Add migration for Gas identifier

* Rename HomeWizardExternalIdentifierSensorEntity class

* Fix all existing tests

* Reimplement tests for extenal devices with smapshots

* Remove non-used 'None' type in unit

* Add migration test

* Clean up parameterize

* Add test to fix last coverage issue

* Fix non-frozen mypy issue

* Set device name via added EntityDescription field

* Remove device key translations for external sensors,

* Bring back translation keys

* Set device unique_id as serial number

* Remove meter identifier sensor

* Simplify external device initialization

* Adjust tests

* Remove unused gas_meter_id migration

* Remove external_devices redaction

* Remove old gas meter id sensor after migration
2024-01-25 12:51:50 +01:00
Duco Sebel f7b0a15aa5
Bumb python-homewizard-energy to 4.2.1 (#108738) 2024-01-24 08:31:23 +01:00
Franck Nijhof e71efa0e2b
Add icon translations to HomeWizard Energy (#108506)
* Add icon translations to HomeWizard Energy

* Update snapshots
2024-01-20 14:14:48 -05:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00
Duco Sebel 156dac394a
Add migration for old HomeWizard sensors (#105251)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-12-08 09:39:39 +01:00
Duco Sebel f8c216a5ea
Use brightness scaling util in HomeWizard Number entity (#105147) 2023-12-07 09:37:20 +01:00
Duco Sebel 3d5329755f
Add extra tests for HomeWizard for unsupported entity creation (#105149) 2023-12-07 09:24:27 +01:00
Franck Nijhof cd1ee70707
Use orjson to load HomeWizard test fixtures (#104832) 2023-11-30 19:58:33 +01:00
Franck Nijhof 321b24b146
Improve user-facing error messages in HomeWizard Energy (#104547) 2023-11-27 07:47:46 +01:00
Franck Nijhof 32eab2c7ed
Remove duplicate sensors on single phase HomeWizard meters (#104493)
Co-authored-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com>
2023-11-26 11:42:47 +01:00
Franck Nijhof bd27358398
Adjust HomeWizard test fixtures to match actual devices (#104537) 2023-11-26 11:09:14 +01:00
Franck Nijhof 8273427974
Complete tests for HomeWizard energy plug HWE-SKT (#104474) 2023-11-24 17:38:39 -06:00
Duco Sebel d4458cbac4
Fix HomeWizard sensors unavailable when value is '0' (#104302)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-24 21:38:46 +01:00
Duco Sebel 97d38dae09
Bumb python-homewizard-energy to 4.1.0 (#104121)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2023-11-17 13:01:44 +01:00
Franck Nijhof b3ceb82700
Add device fixtures and tests for HomeWizard Energy 3-phase kWh meter (#104118) 2023-11-17 11:47:42 +01:00
Franck Nijhof bb63da764e
Complete tests for HomeWizard kWh Meter SDM230 (#103840) 2023-11-12 14:30:00 +01:00
Franck Nijhof 5a452155fc
Small cleanup in HomeWizard tests (#103837) 2023-11-12 11:38:22 +01:00
Franck Nijhof 08b43c4477
Add device fixtures and tests for HomeWizard Energy Watersensor (#103383)
Co-authored-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com>
2023-11-06 18:12:58 +01:00
Franck Nijhof 07f03d9ec9
Set suggested display precision for HomeWizard Energy power sensors (#103369) 2023-11-04 15:40:50 +01:00
Franck Nijhof 109944e4ff
Replace/restructure HomeWizard device fixtures to reflect reality (#103311) 2023-11-04 13:37:08 +01:00
Duco Sebel 0f72495a7d
Rename power to energy in HomeWizard (#102948) 2023-10-30 19:09:23 +01:00
Franck Nijhof 487dcf227e
Rewrite HomeWizard Energy tests (#103000)
Co-authored-by: Duco Sebel <74970928+DCSBL@users.noreply.github.com>
2023-10-30 14:07:42 +01:00
Franck Nijhof 8e112c04fb
Improve diagnostic handling in HomeWizard Energy (#102935) 2023-10-27 23:27:17 +02:00
Franck Nijhof 100c3079ae
Hide mac address from HomeWizard Energy config entry/discovery titles (#102931) 2023-10-27 23:26:28 +02:00
J. Nick Koston 0eca433004
Update zeroconf discovery to use IPAddress objects to avoid conversions (#100567) 2023-09-19 18:58:46 +02:00
Joost Lekkerkerker e9495c9cc6
Add entity translations for homewizard (#95416)
* Add entity translations for homewizard

* Add entity translations for homewizard

* Add entity translations for homewizard

* Fix tests
2023-06-28 14:02:54 +02:00
Duco Sebel 9092f6a60f
Handle UnsupportedError in HomeWizard (#91608)
* Handle UnsupportedEror

* Make error message more clear

* Remove debug line, whoops
2023-04-19 11:14:28 -04:00
Duco Sebel 8ca3440f33
Bump python-homewizard-energy to 2.0.1 (#91097) 2023-04-13 13:42:35 +02:00
epenet 9404a107b2
Add type hints to integration tests (part 10) (#87985) 2023-02-13 10:25:26 +01:00
epenet 37a2040d7b
Add type hints to integration tests (h-i) (#87703) 2023-02-08 18:12:56 +01:00
epenet a79be493e5
Adjust hass_client type hint in integration tests (#86954)
* Adjust hass_client type hint in integration tests

* Adjust hass_client_no_auth

* Fix rebase
2023-02-02 16:29:57 -05:00
Franck Nijhof e4a78420b8
Enable Ruff PT013 (#86757)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2023-01-27 09:09:46 +01:00
Franck Nijhof e50a531cd9
Code styling tweaks to the tests - Part 2 (#86662)
Co-authored-by: jjlawren <jjlawren@users.noreply.github.com>
2023-01-26 01:23:53 +01:00
Duco Sebel bcec69fec1
Upgrade python-homewizard-energy to 1.7.0 (#86383) 2023-01-22 17:11:27 +01:00
Franck Nijhof 7e8c081065
Refactor HomeWizard switch platform to use entity descriptions (#86011) 2023-01-20 08:49:04 -05:00