v2.9.0 - Template Whisperer
Solar Bar Card - Releases
v2.9.0 — Template Whisperer
New Features
-
HA Jinja2 label templates: Any label configurable via
custom_labelsorlabel_*YAML keys now accepts full Home Assistant Jinja2 template syntax. When a value contains{{, it is evaluated server-side via the HA websocketrender_templateAPI and updated reactively. Static label strings continue to work as before — no migration needed. The Custom Labels section has been removed from the visual editor (labels are YAML-only with template support); all previously configured labels remain fully compatible.custom_labels: solar: "{{ states('sensor.inverter_model') }}" export: "{{ 'Selling' if states('sensor.export_power')|float > 0 else 'Export' }}"
-
Bar segment text templates (
segment_text_*): Each of the five bar segments now accepts a freeform text template with token substitution. Configure via YAML; leave unset to use the defaultvalue labelformat. Available tokens:Token Description {value}Formatted power value (respects power_unitandshow_power_unit){label}Translated or custom label for this segment {percent}Segment width as a rounded percentage of the bar {raw}Raw numeric value (integer W or decimal kW, no unit suffix) Config keys and their segments:
Key Segment segment_text_solar_homeSolar → Home (self-consumption) segment_text_solar_evSolar → EV segment_text_battery_chargeSolar → Battery segment_text_exportExport segment_text_ev_potentialEV potential (pre-charge overlay) segment_text_solar_home: "{value}" segment_text_export: "{percent} → grid" segment_text_battery_charge: "⚡ {raw}W"