lozzd / octopus-energy-rates-card

This lovelace card for Home Assistant displays the Octopus Energy rate prices per each 30 minute slot
MIT License
60 stars 22 forks source link

Feature request - only show targetTimeEntity slots. #46

Open Daverover66 opened 7 months ago

Daverover66 commented 7 months ago

I have created a couple of intermittent target time entities, one for a 3 hour period and one for a 4 hour period. Rather than show all slots with the cheapest shown in blue, would it be possible to only show the range of chosen slots.

So this: Screenshot_20231204_092735_Home Assistant

rather than this:

Screenshot_20231204_092735_Home Assistant

Hope that makes sense thanks.

corvus2606 commented 5 months ago

this is a bit of an edge case i think, but you can achieve this with card mod: ideally you should configure the card to have only one column. tthen install card mod and add this to your card yaml:

card_mod:
  style: |
    tr.rate_row{ display: none;}
    tr.rate_row:has(.time_highlight) { display: block ;}

should give you this:

image