Commit Graph

71 Commits (2deab9e0c2ce7d54c87524f39e6454c019b6ee02)

Author SHA1 Message Date
Erik Montnemery d82bff1bc2
Index config entry discovery_keys by discovery domain (#126563)
* Index config entry discovery_keys by discovery domain

* Add new signal

* Update tests

* Update homeassistant/config_entries.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Fix imports

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 21:48:11 +02:00
Erik Montnemery b2982c18bb
Reinitialize zeroconf discovery flow on unignore (#125753)
* Reinitialize zeroconf discovery flow on unignore

* Adjust tests

* Improve comments

* Fix logic for updating discovery keys

* Add tests

* Use mock_config_flow helper in new config_entries test

* Add discovery_keys attribute to ConfigEntry

* Update zeroconf rediscovery

* Change type of ConfigEntry.discovery_keys

* Update tests

* Fix DiscoveryKey.from_json_dict and add tests

* Fix test

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-09-23 16:49:21 +02:00
Arie Catsman 66f9e06c25
Reload enphase_envoy integration upon envoy firmware change detection (#124650)
* Reload enphase_envoy integration upon envoy firmware change detection.

* remove persistant notification
2024-09-11 19:39:54 +02:00
Arie Catsman 3c1860cca2
Add storage settings for enphase_envoy batteries without enpower device (#125527)
* Add battery storage settings for enphase_envoy EU configuration

* Add EU Battery test fixture to enphase_envoy

* Add tests and snapshots for enphase_envoy EU battery

* refactor eu battery fixture to align with other enphase_envoy fixtures

* remove if from test and use test parameter for eu battery enphase_envoy tests
2024-09-11 13:32:29 +02:00
Arie Catsman 1a21266325
Improve test code coverage for enphase_envoy (#125582)
* Improve test code coverage for enphase_envoy

* Update tests/components/enphase_envoy/test_init.py

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

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
2024-09-11 13:03:17 +02:00
Arie Catsman 74b78307ee
Add balanced grid import/export to enphase_envoy (#123154)
* Add balanced grid import/export to enphase_envoy

* rebuild sensor snapshot after dev merge

* Cleanup snapshot file
2024-09-08 12:15:00 +02:00
Arie Catsman ea7b2ecec0
Improve coordinator test coverage for enphase_envoy (#122375)
* Improve coordinator test coverage for enphase_envoy

* rename to test_coordinator to test_init for enphase_envoy

* Mock pyenphase _obtain_token instead of httpx auth requests in enphase_envoy tests.

* Move EnvoyTokenAuth patch to mock_envoy of enphase_envoy
2024-09-06 17:14:37 +02:00
Arie Catsman 49b07b3749
Provide same entities for all Enphase_envoy CT types (#124531)
Provide same entities for all Enphase_envoy CT types.
2024-09-06 16:56:43 +02:00
epenet 99335a07e5
Use start_reauth helper method in integration tests (e-g) (#124785)
* Use start_reauth helper method in integration tests (e-g)

* Include fireservicerota
2024-08-28 15:47:57 +02:00
Arie Catsman e5c36c8d56
Refactor asserts in enphase_envoy test_sensor (#122726)
refactor asserts in enphase_envoy test_sensor
2024-07-28 16:36:36 +02:00
Arie Catsman b0780e1db5
Remove conditions from enphase_envoy test_switch (#122693) 2024-07-27 14:32:37 +02:00
Robert Resch 4c853803f1
Add created_at/modified_at to device registry (#122369) 2024-07-22 19:15:23 +02:00
Arie Catsman 8da630f8c6
Improve sensor test coverage for enphase_envoy (#122229)
* Improve sensor platform test COV for enphase_envoy

* Use async_fire_time_changed to trigger next data update in enphase_envoy test
2024-07-21 12:26:32 +02:00
Arie Catsman 221480add1
Improve switch platform test COV for enphase_envoy (#122227) 2024-07-20 11:20:46 +02:00
Marc Mueller c92d9dcb74
Use TypeVar defaults for Generator (#122170) 2024-07-19 13:06:45 +02:00
Arie Catsman 0b691f9393
Improve number platform test COV for enphase_envoy (#122163)
* Improve number platform COV for enphase_envoy

* remove use of rand in pytest_number of enphase_envoy
2024-07-19 11:47:40 +02:00
Arie Catsman 6d725b5e34
Extend sensor platform tests for enphase_envoy (#122132)
* EnphaseTestSensor

* refactor chain use in sensor test of enphase_envoy
2024-07-18 21:50:50 +02:00
Arie Catsman 37426f7366
Add number platform test to enphase_envoy (#122117)
* Add number platform test to enphase_envoy

* Use ATTR_VALUE in enphase_envoy number test
2024-07-18 15:42:57 +02:00
Arie Catsman d983e3b25d
Add select platform test to enphase_envoy (#122127) 2024-07-18 14:20:05 +02:00
Arie Catsman f551130d65
Add binary_sensor platform test to enphase_envoy (#122120) 2024-07-18 12:45:03 +02:00
Arie Catsman 1e8da192b6
Add switch platform test to enphase_envoy (#122068)
* Add switch platform test to enphase_envoy

* review feedback Use HA SWITCH_DOMAIN

* Only use SWITCH_DOMAIN for service call
2024-07-17 14:51:02 +02:00
Arie Catsman baa97ca981
Add fixture files to Enphase_Envoy tests (#121864)
* Add fixture files to Enphase_Envoy tests

* optimize fixtures in enphase_envoy conftest

* combine setup_enphase_envoy and mock_envoy in enphase_envoy tests

* Revert "combine setup_enphase_envoy and mock_envoy in enphase_envoy tests"

This reverts commit ec072c4726.

* Rework enphase tests

* Rework enphase tests

* reset diagnostics test snapshot

---------

Co-authored-by: Joostlek <joostlek@outlook.com>
2024-07-16 21:14:46 +02:00
Joost Lekkerkerker f8ba4d41ba
Add support for adding model_id in device info (#121989) 2024-07-16 15:12:25 +02:00
Marc Mueller 2f0dd6f704
Import Generator from collections.abc (2) (#120915) 2024-07-01 11:58:49 +02:00
epenet 629dab238f
Improve type hints in enphase_envoy tests (#120676) 2024-06-27 13:24:22 -05:00
Erik Montnemery 9bbeb5d608
Add primary_config_entry attribute to device registry entries (#119959)
Co-authored-by: Franck Nijhof <git@frenck.dev>
Co-authored-by: Robert Resch <robert@resch.dev>
2024-06-26 12:26:24 +02:00
Arie Catsman 158c8b8400
Add optional test fixture collection to enphase_envoy diagnostic report (#116242)
* diagnostics_fixtures

* fix codespell errors

* fix merge order and typo

* remove pointless-string-statement
2024-06-24 10:37:32 +02:00
Paulus Schoutsen eb89ce47ea
Inline primary integration (#119860) 2024-06-18 08:08:08 +02:00
Paulus Schoutsen 836abe68c7
Track primary integration (#119741)
* Track primary integration

* Update snapshots

* More snapshots updated

* Uno mas

* Update snapshot
2024-06-16 13:26:06 -04:00
Sid 721b2c2ca8
Enable Ruff PT012 (#113957) 2024-06-08 17:59:08 +02:00
epenet 8837c50da7
Use registry fixtures in tests (a-h) (#118288) 2024-05-28 13:15:16 +02:00
Arie Catsman 83e4c2927c
Implement reconfigure step for enphase_envoy (#115781) 2024-05-27 11:06:55 +02:00
Thomas55555 528d67ee06
Remove unused snapshots [a-f] (#117999) 2024-05-24 08:28:04 +02:00
Arie Catsman bbaa0c16cc
Cancel timer on enphase_envoy config entry unload (#111406)
* lingeringtimer

* Add async_cleanup to enphase_envoy_coordinator and call from unload_entry
2024-04-24 16:33:14 +02:00
Arie Catsman 2c651e190f
Add additional zeroconf discovery coverage and logging to enphase_envoy (#114405)
* add debug info to zeroconf for enphase_envoy

* Implement review feedback, lost space

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>

* review feedback textual changes.

* implement review feedbackw.py

Co-authored-by: J. Nick Koston <nick@koston.org>

* Add some more zeroconf tests and valid jwt

* review feedback assert abort reason and keyerror for serialnumber

* Review feedback config flow test ends with abort or create_entry

* Review feedback optimize resource usage

* Cover new code in test.

* Use caplog for debug COV

---------

Co-authored-by: Charles Garwood <cgarwood@newdealmultimedia.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-04-23 08:26:53 -04:00
Arie Catsman 6092894ce5
For new installs make enphase_envoy phase entities default disabled (#115577) 2024-04-14 10:41:00 -05:00
Joost Lekkerkerker b9281327c4
Use FlowResultType enum in config flow tests A-M (#114681) 2024-04-03 09:21:17 +02: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
Arie Catsman 205c457a77
Add home battery storage entities for enphase_envoy (#114015) 2024-03-22 08:46:39 -10: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
Franck Nijhof 0e2775667d
Add category registry (#110897)
* Add category registry

* Add entity registry support

* Update homeassistant/components/config/entity_registry.py

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

* Use ulid instead

* Add tests for adding same name in different scopes

* Handle keyerror on update

* Lookup tweak

* Omit categories from entity registry snapshots

* Use base registry

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-03-15 13:25:16 +01:00
Arie Catsman 44abe329a2
Enphase Envoy refactor and extend diagnostics (#109080)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-09 11:03:07 -10:00
Marc Mueller 38adfbf1a3
Add empty line after module docstring [tests a-e] (#112708) 2024-03-08 08:50:25 -05:00
Arie Catsman 99f08fb417
Fix LingeringTask after test completion in enphase_envoy (#111940) 2024-03-01 07:12:08 -10:00
Arie Catsman d8d44069b5
Add Grid import export to Enphase Envoy (#110884)
* Add Grid import export to enphase Envoy

* Update snapshot for labels dict element in entity registry

* use identity check for enum

* Revert use of identity check, didn't add entities

* Implement review feedback for tests

* ct phase sensors disabled by default

* import PHASENAMES from pyenphase

* Update tests/components/enphase_envoy/test_sensor.py

* Update tests/components/enphase_envoy/test_sensor.py

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-02-27 16:43:43 -05:00
J. Nick Koston 32cd3ad862
Fix lingering timer in enphase_envoy test (#111165) 2024-02-22 12:33:44 -10:00
Arie Catsman a4150fe8b2
Enable Enphase Envoy authentication credentials update (#110474) 2024-02-17 09:58:25 -06:00
Arie Catsman 2b33feb341
Add phase entities to Enphase Envoy (#108725)
* add phase entities to Enphase Envoy

* Implement review feedback for translation strings

* Enphase Envoy multiphase review changes

Move device name logic to separate function.
Refactor native value for phases
Use dataclasses.replace for phase entities, add on-phase to base class as well, no need for phase entity descriptions anymore

* Enphase Envoy reviewe feedback

Move model determination to library.
Revert states test for future split to sensor test.

* Enphase_Envoy use model description from pyenphase library

* Enphase_Envoy refactor Phase Sensors

* Enphase_Envoy use walrus in phase sensor

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
2024-01-28 22:46:47 +01:00
Charles Garwood 032d120a26
Include Envoy firmware version in Enphase diagnostics (#105742)
* Include Envoy firmware version in Enphase diagnostics

* Update tests
2023-12-14 13:59:39 -05:00
Erik Montnemery 6908497c3d
Add minor version to config entries (#105479) 2023-12-12 08:44:35 +01:00