Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. entity: sensor.energia_gasta_dia
  2. layout: icon_state_name2nd
  3. show_name: false
  4. show_state: false
  5. show_icon: false
  6. custom_fields:
  7. icone: |
  8. [[[
  9. return `<ha-icon
  10. icon="mdi:currency-usd"
  11. style="width: 60px; height: 60px;">
  12. </ha-icon><br><b>Energia Gasta</b></span>`
  13. ]]]
  14. hoje: |
  15. [[[
  16. return `<ha-icon
  17. icon="mdi:cash-usd"
  18. style="width: 18px; height: 18px; color: #7CB342;">
  19. </ha-icon><span> R$ <b>${entity.state}</b> hoje</span>`
  20. ]]]
  21. ontem: |
  22. [[[
  23. return `<ha-icon
  24. icon="mdi:cash-usd"
  25. style="width: 18px; height: 18px; color: #7CB342;">
  26. </ha-icon><span> R$ <span style="color: var(--text-color-sensor);">
  27. <b>${states['sensor.energia_gasta_ontem'].state}</b> ontem</span></span>`
  28. ]]]
  29. mes: |
  30. [[[
  31. return `<ha-icon
  32. icon="mdi:cash-usd"
  33. style="width: 18px; height: 18px; color: #7CB342;">
  34. </ha-icon><span> R$ <span style="color: var(--text-color-sensor);">
  35. <b>${states['sensor.gasto_mes'].state}</b> no mês</span></span>`
  36. ]]]
  37. watts: |
  38. [[[
  39. return `<span style="line-height: 14px"><ha-icon
  40. icon="mdi:power-plug"
  41. style="width: 56px; height: 56px; color: var(--secondary-text-color);">
  42. </ha-icon><br><span style="font-size: 28px; color: var(--text-color-sensor);">
  43. <b>${states['sensor.watts'].state}</b></span>W</span>`
  44. ]]]
  45. tensao: |
  46. [[[
  47. return `<span style=" color: var(--text-color-sensor);">
  48. ${states['sensor.voltagem'].state}</span>v`
  49. ]]]
  50. styles:
  51. card:
  52. - padding: 11%
  53. - font-size: 15px
  54. custom_fields:
  55. icone:
  56. - position: absolute
  57. - left: 5%
  58. - top: 5%
  59. hoje:
  60. - position: absolute
  61. - left: 30%
  62. - top: 10%
  63. ontem:
  64. - position: absolute
  65. - left: 30%
  66. - top: 40%
  67. mes:
  68. - position: absolute
  69. - left: 30%
  70. - top: 70%
  71. watts:
  72. - position: absolute
  73. - left: 74%
  74. - top: 3%
  75. tensao:
  76. - position: absolute
  77. - left: 78%
  78. - top: 24%
  79. - border-radius: 10%
  80. - position: absolute
  81. - font-size: 11px
  82. type: 'custom:button-card'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement