Timeflow card v2.0.0
π TimeFlow Card v2.0.0 - Major Template System Release
β¨ Major New Features
π― Complete Home Assistant Template Support
- Full Jinja2 template evaluation for all card properties
- Smart fallback handling with automatic extraction from template expressions
- Template result caching (5-second cache) for optimal performance
- Dual API support (callApi + callWS) for maximum compatibility
π Template-Enabled Properties
All card properties now support Home Assistant templates:
title- Dynamic titles based on entity statessubtitle- Smart subtitle generationtarget_date- Dynamic countdown targetscreation_date- Dynamic start datescolor- State-based text colorsbackground_color- Dynamic background themesprogress_color- Conditional progress colors
π§ Supported Template Patterns
# Simple OR fallback
title: "{{ states('sensor.event_name') or 'Default Event' }}"
# Chained OR fallback
title: "{{ states('sensor.primary') or states('sensor.backup') or 'Fallback' }}"
# Conditional expressions
color: "{{ '#ff0000' if states('sensor.temperature')|float > 30 else '#00ff00' }}"
# Dynamic dates
target_date: "{{ states('input_datetime.deadline') }}"
# Complex conditionals
background_color: "{{ '#87CEEB' if state_attr('sun.sun', 'elevation') > 0 else '#191970' }}"π¨ Real-World Examples
Dynamic Sunrise/Sunset Countdown
type: custom:timeflow-card
title: "{{ 'Next Sunrise' if states('sun.sun') == 'below_horizon' else 'Next Sunset' }}"
target_date: "{{ state_attr('sun.sun', 'next_rising') if states('sun.sun') == 'below_horizon' else state_attr('sun.sun', 'next_setting') }}"
color: "{{ '#FFD700' if states('sun.sun') == 'below_horizon' else '#FF6347' }}"Event Countdown with Urgency Colors
type: custom:timeflow-card
title: "{{ states('input_text.event_name') or 'My Event' }}"
target_date: "{{ states('input_datetime.event_time') }}"
background_color: "{{ '#FF0000' if (as_timestamp(states('input_datetime.event_time')) - now()) < 86400 else '#1976d2' }}"Weather-Responsive Styling
type: custom:timeflow-card
title: "Weekend Getaway"
target_date: "2025-08-01T15:00:00"
color: "{{ '#ff4444' if states('sensor.temperature')|float > 30 else '#4444ff' }}"
background_color: "{{ '#87CEEB' if states('weather.home') == 'sunny' else '#778899' }}"π Backward Compatibility
- β 100% backward compatible - existing configurations work unchanged
- β Progressive enhancement - templates are completely optional
- β No breaking changes to current functionality
- β Seamless migration from v1.x
π Documentation
Template support follows Home Assistant standards:
- Compatible with all Jinja2 template functions
- Supports
states(),state_attr(),now(), filters - Works with custom template functions and macros
π― Migration Guide
From v1.x to v2.0.0:
No changes required! Your existing configuration will continue working exactly as before.
To use new template features:
Simply wrap any property value in {{ }} with your template expression.
π Credits
Template system inspired by and compatible with:
- Home Assistant's native template engine
- button-card template patterns
- mushroom-card template syntax
Full Changelog: v1.0.0...v2.0.0
Installation: Available through manual installation
Compatibility: Home Assistant 2023.4+
Browser Support: All modern browsers
This release transforms TimeFlow Card from a static countdown timer into a fully dynamic, template-driven component that adapts to your Home Assistant state in real-time! π β°β¨