- Add main card implementation with full/compact/super_compact modes - Support for sparkline and bars widgets with effects - Price color coding based on best/worst price ranges - Alert system for high/low price thresholds - Polish/English translations support - HACS integration configuration - Development guidelines in AGENTS.md
🏠 Pstryk Energy Card dla Home Assistant
✨ Co potrafi?
- 🎨 Trzy tryby wyświetlania: pełny, kompaktowy, super kompaktowy
- 📊 Widgety: słupki lub linia z animacją
- 🚨 Alerty: ostrzeżenia, gdy cena przekracza ustalone progi
- 🔴🟢 Zmiana koloru na czerwony/zielony w zależności od ustawień cen w integracji
- 🌍 Obsługa PL i EN – karta sama wykryje język
- 🎯 Efekty i zbędne bajery
📦 Jak zainstalować?
1. HACS (najprościej)
- Otwórz HACS → +
- Wybierz Custom repositories
- Wklej URL:
https://github.com/balgerion/ha_Pstryk_card - W kategorii zaznacz Dashboard i kliknij Add
- Zainstaluj Pstryk Energy Card
- Zrestartuj Home Assistant
2. Ręcznie
-
Ściągnij plik
pstryk-card.jsi wrzuć do/www/community/pstryk-card -
W Home Assistant: Settings → Dashboards → Resources → Add Resource
- URL:
/local/community/pstryk-card/pstryk-card.js - Typ: JavaScript Module
- URL:
-
Zrestartuj
🚀 Szybki start - przykłady
##full
type: custom:pstryk-card
buy_entity: sensor.pstryk_current_buy_price
sell_entity: sensor.pstryk_current_sell_price
card_mode: full # full | compact | super_compact
show_title: true # true | false
show_legend: true # true | false
show_widget: sparkline # none | bars | sparkline
widget_effect: pulse # none | pulse (sparkline) | fill (bars)
widget_hours: 24 # 1-48
alert_buy_above: 1.15 # liczba lub null
alert_sell_below: 0.25 # liczba lub null
hover_effect: lift # none | lift | glow | shake | pulse
click_action: none # none | more-info
##Kompaktowy z słupkami
type: custom:pstryk-card
buy_entity: sensor.pstryk_current_buy_price
sell_entity: sensor.pstryk_current_sell_price
card_mode: compact # full | compact | super_compact
show_widget: bars # none | bars | sparkline
widget_effect: fill # none | fill (bars) | pulse (sparkline)
widget_hours: 12 # 1-48
hover_effect: glow # none | lift | glow | shake | pulse
attribute_config: average_24 # next_hour | average_remaining | average_24 | null | custom_attribute
##Super kompaktowy (minimalny)
type: custom:pstryk-card
buy_entity: sensor.pstryk_current_buy_price
sell_entity: sensor.pstryk_current_sell_price
card_mode: super_compact # full | compact | super_compact
alert_buy_above: 1.0 # liczba lub null
alert_sell_below: 0.1 # liczba lub null
⚙️ Wszystkie opcje
- buy_entity (
string) – encja z ceną zakupu (np.sensor.pstryk_current_buy_price) - sell_entity (
string) – encja z ceną sprzedaży - card_mode (
full/compact/super_compact) – wybierz wygląd karty - title (
string) – tekst nagłówka (domyślnie "Energy Prices") - show_title (
true/false) – wyświetl tytuł - show_legend (
true/false) – legenda kolorów (tylko wfull) - attribute_config (
next_hour/average_remaining/average_24/null/custom) – dodatkowy atrybut - show_widget (
none/bars/sparkline) – typ wykresu - widget_effect (
none/pulse/fill) – animacja wykresu (pulse (sparkline), fill (bars))
Description
Languages
JavaScript
100%