Repository navigation
v2.4.16
Changes — 2026-03-31 — v2.4.16
Summary of work completed for this release (documentation, logging, file-descriptor handling verification, and optimizer entity naming).
1. Per-optimizer entity IDs and friendly names (sensor platform)
SolarEdgeOptimizersSensor: Set_attr_has_entity_name = Falseso Home Assistant does not prepend the optimizer device slug toentity_id(fixes patterns likesensor.optimizer_1_1_1_power_1_1_1in favour of path-based ids such assensor.power_1_1_1).async_added_to_hass: Builds_attr_namefrom loaded translations: per-sensor label (entity.sensor.<slug>.name) plus templateentity.sensor.optimizer_sensor.name({sensor_type} {optimizer_display})._set_optimizer_identity: Stores_sensor_translation_slug;_attr_translation_keyisNonefor optimizers because the composite name replaces the short translation-key name behaviour.- Debug: When debug logging is enabled, logs optimizer friendly name, display string, slug, and
internal_integration_suggested_object_idafter the name is set.
2. Translations
- Added
entity.sensor.optimizer_sensorwithname:"{sensor_type} {optimizer_display}"to:strings.json- All
translations/*.jsonlocale files (cs, da, de, el, en, es, fi, fr, hu, it, ja, nb, nl, pl, pt, ru, sv, tr, zh).
3. File descriptors and API cleanup (verified; no behavioural change required)
- Dual API (
api_dual.py):close()closes both One and legacy clients; exceptions on one side are logged; the other client is still closed. - Legacy (
solaredgeoptimizers.py): Thread-local sessions tracked in_all_sessions; HTTP useswith session.request(...);close()iterates andsession.close()on all tracked sessions. - SolarEdge One (
solaredge_one_api.py): Routinerequests.get/postuse response context managers; OAuth useswith Session();close()clears tokens and sets_closed. - Entry lifecycle (
__init__.py,config_flow.py):api.close()on setup failure, unload, andasync_remove_entryso descriptors are released even if platform unload fails.
4. Debug logging (documentation alignment)
- README.md, info.md, docs/Wiki-Home.md: Debug bullet lists updated to include per-optimizer
async_added_to_hassname/suggested_object_idlogging.
5. Code quality (CodeFactor / repo standards)
- Project rules remain:
.pylintrc—max-args=10,max-module-lines=2000,max-line-length=159;setup.cfg— pycodestylemax-line-length=159. - New code follows guarded debug logging and stays within line-length limits for the touched modules.
6. Module and user documentation
__init__.py: Module docstring extended with sensorhas_entity_name/optimizer_sensorbehaviour.coordinator.py: Note pointing tosensor.pyfor per-optimizer entity naming.README.md: Hierarchy / entity ID section; aggregated vs per-optimizer naming; debug log paragraph.info.md: Entity ID / naming and debug paragraphs.docs/Wiki-Home.md: Entity IDs, entity names, troubleshooting row for duplicate device+path entity ids, debug coverage paragraph.docs/SolarEdge-One-API-Summary.md: Bullet on optimizer entity IDs (One vs legacy same sensor behaviour).docs/internationalization.md:optimizer_sensortemplate and per-optimizer naming.
7. Version
manifest.json:versionset to2.4.16.
Existing installs: unique_id is unchanged; entity registry may keep previous entity_id until entities are recreated. New installs or reloads that recreate entities get the updated id pattern.
Follow-up (same release): short optimizer friendly names only
Per-optimizer friendly names were changed from "{sensor_type} {optimizer_display}" (e.g. “Azimuth 2065855.1.1.2”) to only the translated sensor label (e.g. “Azimuth”): async_added_to_hass sets _attr_name to the resolved entity.sensor.<slug>.name string. The device name still shows the optimizer position. The unused entity.sensor.optimizer_sensor key was removed from strings.json and all translations/*.json files.
What's Changed
- v2.4.16 by @AndrewTapp in #41
Full Changelog: 2.4.15...2.4.16