mirror of
https://github.com/jpawlowski/hass.tibber_prices.git
synced 2026-03-29 21:03:40 +00:00
Added optional diagnostic binary sensor that exposes get_chartdata service results as entity attributes for legacy dashboard tools. Key features: - Entity: binary_sensor.tibber_home_NAME_chart_data_export - Configurable via Options Flow Step 7 (YAML parameters) - Calls get_chartdata service with user configuration - Exposes response as attributes for chart cards - Disabled by default (opt-in) - Auto-refreshes on coordinator updates - Manual refresh via homeassistant.update_entity Implementation details: - Added chart_data_export entity description to definitions.py - Implemented state/attribute logic in binary_sensor/core.py - Added YAML configuration schema in schemas.py - Added validation in options_flow.py (Step 7) - Service call validation with detailed error messages - Attribute ordering: metadata first, descriptions next, service data last - Dynamic icon mapping (database-export/database-alert) Translations: - Added chart_data_export_config to all 5 languages - Added Step 7 descriptions with legacy warning - Added invalid_yaml_syntax/invalid_yaml_structure error messages - Added custom_translations for sensor descriptions Documentation: - Added Chart Data Export section to sensors.md - Added comprehensive service guide to services.md - Migration path from sensor to service - Configuration instructions via Options Flow Impact: Provides backward compatibility for dashboard tools that can only read entity attributes (e.g., older ApexCharts versions). New integrations should use tibber_prices.get_chartdata service directly. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| options_flow.py | ||
| schemas.py | ||
| subentry_flow.py | ||
| user_flow.py | ||
| validators.py | ||