Skip to content

Release Notes v1.0.7

Latest

Choose a tag to compare

@cheapest-energy-windows cheapest-energy-windows released this 10 Dec 10:23

Cheapest Energy Windows Dashboard - v1.0.7

🎨 Enhancements & Improvements

1. Cost Tracking Consolidation & Display Improvements

Enhanced: Streamlined cost display and improved visual clarity throughout the dashboard.

Problem:

  • Cost Tracking section was redundant when base_usage=0, showing identical values to Daily Net Cost cards
  • Daily cost cards had truncated text and unclear format
  • Base Usage info card was unreadable due to text truncation

Changes Made:

Daily Cost Cards (Today & Tomorrow)

  • Files:

    • cheapest_energy_windows_dashboard_yaml/dashboard.yaml (Lines 479-518, 1167-1194)
    • cheapest_energy_windows_dashboard/cew-dashboard-strategy.js (regenerated)
  • Title: Changed from "Daily Net Cost" to "Daily Cost"

  • Multi-line Display: Added multiline_secondary: true property to enable proper line breaks

  • Format Enhancement:

    • Line 1: Current/Planned Cost display (e.g., "€6.19/€0.98" for Today, "€10.54" for Tomorrow)
    • Line 2: Window Progress (e.g., "30/53" showing completed/total windows)
  • Before: Text truncated as "€8.8/€0.0 30..." on single line

  • After: Clear two-line display with proper formatting

Cost Tracking Section Removal

  • Files: cheapest_energy_windows_dashboard_yaml/dashboard.yaml
  • Removed: ~54 lines of redundant Cost Tracking section
  • Reason: When base_usage=0, displayed same values as Daily Cost cards
  • Result: Cleaner dashboard, eliminated ~220 lines of complex template calculations

Base Usage Information Cards Split

  • Files: cheapest_energy_windows_dashboard_yaml/dashboard.yaml (Lines 1686-1699)
  • Before: Single card with ~195 characters causing truncation ("Track constant household power consumption (appliances, lights, et...")
  • After: Two separate cards with clear, readable text:
    • Card 1: "Base Usage Feature" - Explains what it tracks
    • Card 2: "How to Configure" - Configuration guidance
  • Impact: Users can now read full information without truncation

Impact:

  • Clearer cost visibility with no text truncation
  • Better organization and reduced complexity
  • Improved user experience with readable information cards
  • Dashboard automatically adjusts based on base_usage configuration

2. Template Robustness Improvements

Fixed: Enhanced template reliability to handle edge cases and missing attributes gracefully.

Issues Addressed:

  1. Jinja2 Default Filter: Changed from or [] pattern to | default([], true) throughout dashboard

    • Problem: Using or [] broke operator precedence, causing "TypeError: object of type 'NoneType' has no len()"
    • Solution: | default([], true) properly handles both missing attributes AND None values
    • Example: state_attr('sensor.cew_today', 'actual_charge_times') | default([], true) | length
  2. YAML Block Scalars: Changed from >- (folded) to | (literal) for multi-line output

    • Problem: >- treated \n as literal text instead of line breaks
    • Solution: | preserves actual line breaks in template output
    • Applied to: Daily Cost card secondary text (Today and Tomorrow)

Files Modified:

  • cheapest_energy_windows_dashboard_yaml/dashboard.yaml (Multiple template locations)
  • cheapest_energy_windows_dashboard/cew-dashboard-strategy.js (regenerated)

Impact:

  • Templates handle None/missing values without errors
  • Multi-line text displays correctly in cards
  • More stable dashboard with better error handling

3. Planned Total Cost Integration

Added: Dashboard now displays planned total cost alongside current cost for better budget visibility.

Feature:

  • Integrated new planned_total_cost attribute from Integration v1.0.7
  • Shows estimated total daily cost for all planned windows (not just completed)

Display Format:

  • Today's Daily Cost: "€8.80/€15.50" (current/planned)
  • Tomorrow's Daily Cost: "€10.54" (planned only, no completed windows yet)

Files Modified:

  • cheapest_energy_windows_dashboard_yaml/dashboard.yaml (Daily Cost cards)
  • cheapest_energy_windows_dashboard/cew-dashboard-strategy.js (regenerated)

Impact:

  • Users can see both current and projected costs side-by-side
  • Better budget planning and energy usage insights
  • Clear visibility into cost progression throughout the day

4. Repository URL Updates

Fixed: Updated GitHub organization references from old naming convention.

Changes Made:

  • File: cheapest_energy_windows_dashboard/info.md (Line 10)
  • Updated: Integration link from github.com/cew-hacs/... to github.com/cheapest-energy-windows/...

Impact:

  • HACS displays correct repository organization name
  • Documentation links point to correct GitHub location
  • Consistent with Integration v1.0.7 URL updates

πŸ“‹ Deployment Instructions

Option 1: HACS Installation (Recommended)

  1. Update the dashboard through HACS
  2. Hard refresh your browser: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows/Linux)
  3. Verify multi-line display in Daily Cost cards

Option 2: Manual Installation

  1. Copy cew-dashboard-strategy.js to:
    • /config/www/community/cheapest_energy_windows_dashboard/
  2. Clear browser cache and refresh dashboard
  3. Verify all cost displays and multi-line formatting

πŸ”„ Dashboard Configuration Notes

Requirements:

  • Cheapest Energy Windows Integration v1.0.7 (required for planned_total_cost attribute)
  • ApexCharts Card
  • Mushroom Cards
  • Card Mod
  • fold-entity-row

Compatibility:

  • Fully compatible with Integration v1.0.7
  • Backward compatible with base_usage=0 configurations
  • No dashboard configuration changes required

New Features Available with v1.0.7:

  • Planned total cost display
  • Improved cost tracking visibility
  • Enhanced multi-line card displays
  • More robust template handling

πŸ“ Technical Changes Summary

Files Modified (6 files)

  1. cheapest_energy_windows_dashboard_yaml/dashboard.yaml - Core dashboard configuration
  2. cheapest_energy_windows_dashboard/cew-dashboard-strategy.js - Generated JavaScript
  3. cheapest_energy_windows_dashboard/info.md - Repository documentation

Lines Changed

  • Added: multiline_secondary: true to 2 Daily Cost cards
  • Updated: Multiple template patterns (| default([], true))
  • Updated: YAML block scalars (| instead of >-)
  • Removed: ~54 lines of redundant Cost Tracking section
  • Split: Base Usage info into 2 cards
  • Modified: Daily Cost card templates and formatting

Key Template Patterns

# Proper default handling
{{ state_attr('sensor.cew_today', 'actual_charge_times') | default([], true) | length }}

# Literal block scalar for multi-line output
secondary: |
  {% set current = state_attr('sensor.cew_today', 'total_cost') | float(0) %}
  {{ '€' + (current | round(2) | string) }}
  {{ completed }}/{{ total_windows }}

# Enable multi-line display
multiline_secondary: true

Version: 1.0.7
Companion Integration Version: 1.0.7
Repository: cheapest_energy_windows_dashboard
Generated JS Size: 130.30 KB