Skip to content

V2.0 - #167

Merged
moehrem merged 148 commits into
devfrom
v2.0
Oct 12, 2026
Merged

V2.0#167
moehrem merged 148 commits into
devfrom
v2.0

Conversation

@moehrem

@moehrem moehrem commented Oct 12, 2026

Copy link
Copy Markdown
Owner

updating dev with v2.0

moehrem and others added 30 commits March 17, 2026 13:35
Changes to be committed:
	modified:   .vscode/settings.json
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/calendar.py
	modified:   custom_components/diveracontrol/calendar_entity.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/const.py
	modified:   custom_components/diveracontrol/coordinator.py
	modified:   custom_components/diveracontrol/device_tracker.py
	modified:   custom_components/diveracontrol/divera_api.py
	deleted:    custom_components/diveracontrol/divera_credentials.py
	modified:   custom_components/diveracontrol/entity.py
	modified:   custom_components/diveracontrol/manifest.json
	modified:   custom_components/diveracontrol/sensor.py
	modified:   custom_components/diveracontrol/sensor_entity.py
	modified:   custom_components/diveracontrol/utils.py
	modified:   tests/conftest.py
	modified:   tests/test_config_flow.py
	renamed:    tests/test_divera_credentials.py -> tests/test_divera_config_flow_api.py
	modified:   tests/test_init.py
	modified:   tests/test_utils.py
Changes to be committed:
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/divera_api.py
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
	modified:   tests/test_init.py
Changes to be committed:
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/coordinator.py
	modified:   custom_components/diveracontrol/divera_api.py
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
	modified:   tests/conftest.py
	modified:   tests/test_coordinator.py
	modified:   tests/test_divera_api.py
- changed config flow to work with credentials and use api key only in special cases

Changes to be committed:
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/divera_api.py
	modified:   custom_components/diveracontrol/schemas.py
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
	modified:   custom_components/diveracontrol/webhook_handler.py
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
	deleted:    custom_components/diveracontrol/webhook.py
	deleted:    custom_components/diveracontrol/webhook_handler.py
Changes to be committed:
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
	deleted:    custom_components/diveracontrol/webhook.py
	deleted:    custom_components/diveracontrol/webhook_handler.py
changed entities: cluster info, vehicle info
added service: set user status
added device action: set user status
refactored sensor entity handling

Changes to be committed:
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/calendar.py
	modified:   custom_components/diveracontrol/calendar_entity.py
	modified:   custom_components/diveracontrol/const.py
	modified:   custom_components/diveracontrol/device_action.py
	modified:   custom_components/diveracontrol/device_tracker.py
	modified:   custom_components/diveracontrol/device_tracker_entity.py
	modified:   custom_components/diveracontrol/divera_api.py
	modified:   custom_components/diveracontrol/entity.py
	new file:   custom_components/diveracontrol/select.py
	new file:   custom_components/diveracontrol/select_entity.py
	modified:   custom_components/diveracontrol/sensor.py
	modified:   custom_components/diveracontrol/sensor_entity.py
	modified:   custom_components/diveracontrol/service.py
	modified:   custom_components/diveracontrol/services.yaml
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
	modified:   custom_components/diveracontrol/utils.py
	new file:   tests/test_select.py
Changes to be committed:
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/device_tracker_entity.py
	modified:   custom_components/diveracontrol/service.py
	modified:   custom_components/diveracontrol/translations/en.json
	modified:   custom_components/diveracontrol/utils.py
v2.0.0-beta.1

tests failed purposely
Changes to be committed:
	modified:   custom_components/diveracontrol/const.py
	modified:   custom_components/diveracontrol/entity.py
Changes to be committed:
	modified:   custom_components/diveracontrol/device_action.py
	modified:   custom_components/diveracontrol/divera_api.py
	modified:   custom_components/diveracontrol/sensor_entity.py
	modified:   custom_components/diveracontrol/service.py
	modified:   custom_components/diveracontrol/services.yaml
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
…coordinator to update data which includes a fresh data request from Divera

Changes to be committed:
	modified:   .vscode/settings.json
	modified:   custom_components/diveracontrol/service.py
	modified:   custom_components/diveracontrol/utils.py
Changes to be committed:
	new file:   custom_components/diveracontrol/device_trigger.py
	modified:   custom_components/diveracontrol/divera_api.py
	modified:   custom_components/diveracontrol/service.py
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
Changes to be committed:
	modified:   .vscode/settings.json
	modified:   custom_components/diveracontrol/__init__.py
	modified:   custom_components/diveracontrol/calendar.py
	modified:   custom_components/diveracontrol/config_flow.py
	modified:   custom_components/diveracontrol/const.py
	modified:   custom_components/diveracontrol/coordinator.py
	modified:   custom_components/diveracontrol/device_tracker.py
	modified:   custom_components/diveracontrol/divera_api.py
	modified:   custom_components/diveracontrol/schemas.py
	modified:   custom_components/diveracontrol/select.py
	modified:   custom_components/diveracontrol/sensor.py
	modified:   custom_components/diveracontrol/translations/de.json
	modified:   custom_components/diveracontrol/translations/en.json
When sorting is returned as a dict instead of a list (e.g. {}),
indexing it with [0] raises KeyError: 0. The existing try/except
only caught IndexError. Fix by using isinstance() check before
indexing — if sorting is not a non-empty list, set last_alarm_id
to None and return None as before.

Fixes: #127
fix: handle dict sorting in _get_alarm_data to prevent KeyError
Changes to be committed:
	modified:   custom_components/diveracontrol/sensor_entity.py
moehrem and others added 26 commits October 9, 2026 16:19
Changes to be committed:
	modified:   custom_components/diveracontrol/divera_data.py
	modified:   custom_components/diveracontrol/sensor_entity.py
…nabled-023f8c

fix: ensure user status select is always created enabled
- Restore last_alarm right after the merge loop so it survives errors
  in later processing steps
- Add D_LAST_ALARM constant and use it instead of magic string
- Restore last alarm sensor state across restarts via RestoreEntity
- Merge open alarms and last alarm processing into a single block
- Remove commented-out code and dead asyncio.TimeoutError handler

Co-authored-by: moehrem <[email protected]>
refactor: harden last alarm persistence
removed sensor.*vehicle* entities

Changes to be committed:
	modified:   custom_components/diveracontrol/select_entity.py
	modified:   custom_components/diveracontrol/sensor.py
	modified:   custom_components/diveracontrol/sensor_entity.py
…eprecation-230ccd

fix: replace deprecated DeviceEntry.config_entries with config_entry_id
Changes to be committed:
	modified:   custom_components/diveracontrol/services.yaml
Complete vehicle sensor/select merge: dynamic selects, service validation, tests & docs
…gnment, docs, tests)

- Fall back to an offline migration with stored data when the Divera API
  is unreachable during migration instead of leaving the integration
  unusable; new 'migration_offline_v2_0_0' repair-issue informs the user
- Distinguish auth errors from connectivity errors in
  _fetch_and_validate_clusters (ConfigEntryAuthFailed no longer mapped
  to cannot_connect)
- Align migrated entries' unique_id with the v2.0.0 config flow
  convention (cluster_id instead of v1.x ucr_id) via
  hass.config_entries.async_update_entry(unique_id=...)
- Document removed features (webhook mode, vehicle sensors) in the
  breaking_changes_v2_0_0 issue translations (de/en)
- Reactivate migration tests: success, auth failure, no matching
  cluster, offline fallback, full chain from v1.0, no-op case

Co-authored-by: moehrem <[email protected]>
fix: make v2.0.0 migration resilient (offline fallback, unique_id alignment, docs, tests)
v2.0: Alarm-Event-Plattform, Fahrzeug-Status-Selects, Migration & Fixes
…ry-id

fix: DeviceEntry.config_entry_id removed in HA 2025.12
Changes to be committed:
	modified:   custom_components/diveracontrol/manifest.json
@moehrem moehrem self-assigned this Oct 12, 2026
@moehrem
moehrem marked this pull request as ready for review October 12, 2026 14:11
@moehrem
moehrem merged commit 4a047c1 into dev Oct 12, 2026
11 checks passed
@moehrem
moehrem deleted the v2.0 branch October 12, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants