mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Changed description attribute behavior from "add separate long_description attribute" to "switch description content" when CONF_EXTENDED_DESCRIPTIONS is enabled. OLD: description always shown, long_description added as separate attribute NEW: description content switches between short and long based on config Implementation: - Check extended_descriptions flag BEFORE loading translation - Load "long_description" key if enabled, fallback to "description" if missing - Assign loaded content to "description" attribute (same key always) - usage_tips remains separate attribute (only when extended=true) - Updated both sync (entities) and async (services) versions Added PLR0912 noqa: Branch complexity justified by feature requirements (extended check + fallback logic + position handling). Impact: Users see more detailed descriptions when extended mode enabled, without attribute clutter. Fallback ensures robustness if long_description missing in translations. |
||
|---|---|---|
| .. | ||
| api | ||
| binary_sensor | ||
| config_flow_handlers | ||
| coordinator | ||
| custom_translations | ||
| entity_utils | ||
| sensor | ||
| services | ||
| translations | ||
| utils | ||
| __init__.py | ||
| config_flow.py | ||
| const.py | ||
| data.py | ||
| diagnostics.py | ||
| entity.py | ||
| manifest.json | ||
| services.yaml | ||