Commit Graph

97 Commits (c5222708ed16fa528f7336189a6e5994d0f44230)

Author SHA1 Message Date
Arie Catsman 07c304125a
Add error handling to enphase_envoy select platform action (#136698)
* Add error handling to enphase_envoy select platform action

* Add translation key parameter to exception_handler decorator
2025-02-13 09:37:52 +01:00
Arie Catsman 6115def083
Bump pyenphase to 1.25.1 (#138327)
* Bump pyenphase to 1.25.1

* Add new opt_schedules to nephase_envoy test fixtures
2025-02-11 21:35:03 +01:00
Erik Montnemery 4b34d1bbb5
Merge config subentry feature branch to dev (#136121)
* Reapply "Add support for subentries to config entries" (#133470) (#136061)

* Reapply "Add support for subentries to config entries" (#133470)

This reverts commit ecb3bf79f3.

* Update test snapshot

* Add config subentry support to device registry (#128157)

* Add config subentry support to device registry

* Apply suggestions from code review

* Update syrupy serializer

* Update snapshots

* Address review comments

* Allow a device to be connected to no or a single subentry of a config entry

* Update snapshots

* Revert "Allow a device to be connected to no or a single subentry of a config entry"

This reverts commit ec6f613151cb4a806b7961033c004b71b76510c2.

* Update test snapshots

* Bump release version in comments

* Rename config_subentries to config_entries_subentries

* Add config subentry support to entity registry (#128155)

* Add config subentry support to entity registry

* Update syrupy serializer

* Update snapshots

* Update snapshots

* Accept suggested changes

* Clean registries when removing subentry (#136671)

* Clean up registries when removing subentry

* Update tests

* Clean up subentries from deleted devices when removing config entry (#136669)

* Clean up subentries from deleted devices when removing config entry

* Move

* Add config subentry support to entity platform (#128161)

* Add config subentry support to entity platform

* Rename subentry_id to config_subentry_id

* Store subentry type in subentry (#136687)

* Add reconfigure support to config subentries (#133353)

* Add reconfigure support to config subentries

* Update test

* Minor adjustment

* Rename supported_subentry_flows to supported_subentry_types

* Address review comments

* Add subentry support to kitchen sink (#136755)

* Add subentry support to kitchen sink

* Add subentry reconfigure support to kitchen_sink

* Update kitchen_sink tests with subentry type stored in config entry

* Update kitchen_sink

* Update kitchen_sink

* Adjust kitchen sink tests

* Fix hassfest

* Apply suggestions from code review

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

* Improve docstrings and strings.json

---------

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

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

* Update snapshots

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-02-10 16:40:07 +01:00
Marc Mueller 30c0a1492c
Update codespell to 2.4.1 (#137312) 2025-02-04 12:16:24 +01:00
Arie Catsman 97fcbed6e0
Add error handling to enphase_envoy switch platform action (#136837)
* Add error handling to enphase_envoy switch platform action

* Use decorators for exception handling
2025-01-30 11:07:10 +02:00
Arie Catsman ae157e8592
Parameterize enphase_envoy number tests. (#136631) 2025-01-28 16:56:14 +01:00
Arie Catsman 679b7f4032
Fix test logic flaw in enphase_envoy test_select (#136570)
* Fix test logic flaw in enphase_envoy test_select

* Replace test loops by test parameters

* Implement review feedback to Improve use of parametrize parameters
2025-01-27 09:40:39 -06:00
Arie Catsman 642a06b0f0
Optimize enphase_envoy test integration setup. (#136572) 2025-01-26 17:38:45 -06:00
Arie Catsman c98df36b75
Bump pyenphase to 1.23.1 (#136200) 2025-01-23 19:05:57 +01:00
Arie Catsman 8c0515aff2
Set enphase_envoy CT Status flags entity_category to diagnostics. (#136241) 2025-01-22 21:00:12 +02:00
Arie Catsman 03be8a039c
Use icon translations for enphase_envoy. (#136190) 2025-01-22 09:54:45 +01:00
Arie Catsman ba2c8646e9
Add scheduled envoy firmware checks to enphase_envoy coordinator (#136102)
* Add scheduled envoy firmware checks to enphase_envoy coordinator

* Set firmware scantime to 4 hours and split test in 2
2025-01-20 16:58:10 -06:00
epenet af40b6524e
Use new ServiceInfo location in component tests (part 3) (#136064) 2025-01-20 13:16:59 +01:00
Arie Catsman 988a0639f4
Remove enphase_envoy config flow tests that make no sense (#133833) 2025-01-08 20:09:06 +01:00
Arie Catsman f05cffea17
Update enphase_envoy test_init to use str for unique_id and test for loaded config entry (#133810) 2025-01-08 20:06:51 +01:00
Arie Catsman cd6da9d9e8
Merge similar tests to parameterized tests for enphase_envoy (#133740) 2024-12-22 10:07:35 +01:00
Arie Catsman cc134c820b
Reuse title of deleted enphase_envoy config entry if present (#133611) 2024-12-21 15:49:24 +01:00
Arie Catsman ef31413a59
Add missing asserts to enphase_envoy config flow test (#133730) 2024-12-21 15:20:10 +01:00
Erik Montnemery ecb3bf79f3
Revert "Add support for subentries to config entries" (#133470)
Revert "Add support for subentries to config entries (#117355)"

This reverts commit ad15786115.
2024-12-18 13:51:05 +01:00
Arie Catsman 4c91d1b402
Add support for ACB batteries to Enphase Envoy (#131298)
* Add support for ACB batteries to Enphase Envoy

* Add tests for ACB battery support in ENphase Envoy

* make acb state sensordeviceclass ENUM

* Capitalize strings and use common idle
2024-12-18 08:48:37 +01:00
Erik Montnemery ad15786115
Add support for subentries to config entries (#117355)
* Add support for subentries to config entries

* Improve error handling and test coverage

* Include subentry_id in subentry containers

* Auto-generate subentry_id and add optional unique_id

* Tweak

* Update tests

* Fix stale docstring

* Address review comments

* Typing tweaks

* Add methods to ConfigEntries to add and remove subentry

* Improve ConfigSubentryData typed dict

* Update test snapshots

* Adjust tests

* Fix unique_id logic

* Allow multiple subentries with None unique_id

* Add number of subentries to config entry JSON representation

* Add subentry translation support

* Allow integrations to implement multiple subentry flows

* Update translations schema

* Adjust exception text

* Change subentry flow init step to user

* Prevent creating a subentry with colliding unique_id

* Update tests

* Address review comments

* Remove duplicaetd unique_id collision check

* Remove change from the future

* Improve test coverage

* Add default value for unique_id
2024-12-12 20:16:18 +01:00
epenet 25aea140be
Cleanup unnecessary reconfigure_confirm from config flows (#128086) 2024-10-14 12:57:15 +02:00
epenet f6188949f3
Use reconfigure helpers in enphase envoy config flow (#127977) 2024-10-09 17:33:34 +02:00
Arie Catsman 927943e07a
Add option to disable keep-alive for Enphase Envoy connections (#127603) 2024-10-07 10:13:23 +02:00
epenet 9873371413
Use start_reconfigure_flow in config flow tests (#127191)
* Use start_reconfigure_flow in config flow tests

* Adjust fritz
2024-10-02 10:01:15 +02:00
epenet 3fb7547d4d
Use reconfigure_confirm in enphase_envoy config flow (#127221) 2024-10-01 15:11:37 +02:00
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