Advertisement
-Teme-

colored table

Feb 20th, 2025 (edited)
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. type: horizontal-stack
  2. cards:
  3. - type: custom:flex-table-card
  4. title: Today
  5. entities:
  6. include:
  7. - sensor.nordpool_ranked_prices
  8. columns:
  9. - name: ""
  10. data: raw_today
  11. modify: x.hour
  12. icon: mdi:clock
  13. - name: ""
  14. data: raw_today
  15. icon: mdi:currency-eur
  16. align: center
  17. modify: >-
  18. if ( parseFloat(x.value) >= 8.0) '<div style="background-color:#cc0000;">' + x.value + '&nbsp;snt</div>';
  19. else if (x.value >= 5.0) '<div style="background-color:#e67300;">' + x.value + '&nbsp;snt</div>';
  20. else if ( x.value <5.0) '<div style="background-color:#3CB371;">' + x.value +'&nbsp;snt</div>';
  21. - name: ""
  22. data: raw_today
  23. modify: x.rank
  24. icon: mdi:chart-areaspline
  25. align: right
  26. - type: custom:flex-table-card
  27. title: Tomorrow
  28. entities:
  29. include:
  30. - sensor.nordpool_ranked_prices
  31. columns:
  32. - name: ""
  33. data: raw_tomorrow
  34. modify: if ( x.value == undefined ) ""; else x.hour;
  35. icon: mdi:clock
  36. - name: ""
  37. data: raw_tomorrow
  38. icon: mdi:currency-eur
  39. align: center
  40. modify: >-
  41. if ( parseFloat(x.value) >= 8.0) '<div style="background-color:#cc0000;">' + x.value + '&nbsp;snt</div>';
  42. else if (x.value >= 5.0) '<div style="background-color:#e67300;">' + x.value + '&nbsp;snt</div>';
  43. else if ( x.value <5.0) '<div style="background-color:#3CB371;">' + x.value +'&nbsp;snt</div>';
  44. else "";
  45. - name: ""
  46. data: raw_tomorrow
  47. modify: if ( x.value == undefined ) ""; else x.rank;
  48. icon: mdi:chart-areaspline
  49. align: right
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement