diff --git a/custom_components/tibber_prices/entity_utils/colors.py b/custom_components/tibber_prices/entity_utils/colors.py index 848b697..70408ee 100644 --- a/custom_components/tibber_prices/entity_utils/colors.py +++ b/custom_components/tibber_prices/entity_utils/colors.py @@ -65,10 +65,14 @@ def get_icon_color( return BINARY_SENSOR_COLOR_MAPPING[key].get(state_key) # Trend sensor colors (based on trend state) - if key.startswith("price_trend_") and isinstance(state_value, str): + if ( + key.startswith(("price_trend_", "price_outlook_", "price_trajectory_")) or key == "current_price_trend" + ) and isinstance(state_value, str): trend_colors = { + "strongly_rising": "var(--error-color)", "rising": "var(--error-color)", # Red/Orange for rising prices "falling": "var(--success-color)", # Green for falling prices + "strongly_falling": "var(--success-color)", "stable": "var(--state-icon-color)", # Default gray for stable } return trend_colors.get(state_value) diff --git a/custom_components/tibber_prices/entity_utils/icons.py b/custom_components/tibber_prices/entity_utils/icons.py index 9bec4d7..a04390c 100644 --- a/custom_components/tibber_prices/entity_utils/icons.py +++ b/custom_components/tibber_prices/entity_utils/icons.py @@ -91,7 +91,7 @@ def get_trend_icon(key: str, value: Any) -> str | None: if key == "next_price_trend_change": return None # Will be handled by sensor's icon property using attributes - if not key.startswith("price_trend_") and key != "current_price_trend": + if not key.startswith(("price_trend_", "price_outlook_", "price_trajectory_")) and key != "current_price_trend": return None if not isinstance(value, str):