Compare commits

...

8 commits

Author SHA1 Message Date
Julian Pawlowski
9efa7809d0 refactor(colors, icons): enhance trend-related color and icon handling
Some checks are pending
Deploy Docusaurus Documentation (Dual Sites) / Build and Deploy Documentation Sites (push) Waiting to run
Lint / Ruff (push) Waiting to run
Validate / Hassfest validation (push) Waiting to run
Validate / HACS validation (push) Waiting to run
Updated color and icon logic to include additional keys for price trends, outlooks, and trajectories. This improves the visual representation of price changes in the UI.

Impact: Users will see more accurate color coding and icons for price trends and forecasts.
2026-04-14 09:22:34 +00:00
dependabot[bot]
ff08df24e7
chore(deps): update pytest-asyncio requirement from >=0.23.0 to >=1.3.0 (#115) 2026-04-14 07:40:59 +02:00
dependabot[bot]
707e1d47da
chore(deps): update pytest requirement from >=8.0.0 to >=9.0.3 (#114) 2026-04-14 07:39:38 +02:00
dependabot[bot]
236a15bea4
chore(deps): update pytest-homeassistant-custom-component requirement (#113) 2026-04-14 07:39:08 +02:00
dependabot[bot]
f2a8cd6777
chore(deps): bump actions/github-script from 7 to 9 (#112) 2026-04-14 07:38:47 +02:00
dependabot[bot]
9af252fb61
chore(deps): bump actions/setup-python from 5 to 6 (#111) 2026-04-14 07:38:36 +02:00
dependabot[bot]
4b0aa4a93b
chore(deps): bump softprops/action-gh-release from 2 to 3 (#110) 2026-04-14 07:38:18 +02:00
dependabot[bot]
a54c1353e1
chore(deps): bump actions/upload-pages-artifact from 4 to 5 (#109) 2026-04-14 07:38:02 +02:00
6 changed files with 13 additions and 9 deletions

View file

@ -14,7 +14,7 @@ jobs:
issues: write
steps:
- name: Assign issue to owner
uses: actions/github-script@v7
uses: actions/github-script@v9
with:
script: |
await github.rest.issues.addAssignees({

View file

@ -54,7 +54,7 @@ jobs:
# VERIFY GENERATED DOCS
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.14'
@ -163,7 +163,7 @@ jobs:
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
uses: actions/upload-pages-artifact@v5
with:
path: ./deploy-root

View file

@ -255,7 +255,7 @@ jobs:
- name: Create GitHub Release
if: steps.version_check.outputs.warning == ''
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
name: ${{ steps.release_notes.outputs.title }}
body: ${{ steps.release_notes.outputs.notes }}

View file

@ -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)

View file

@ -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):

View file

@ -79,7 +79,7 @@ markers = [
[project.optional-dependencies]
test = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-homeassistant-custom-component>=0.13.0",
"pytest>=9.0.3",
"pytest-asyncio>=1.3.0",
"pytest-homeassistant-custom-component>=0.13.323",
]