Advertisement
rhessellund

Sell Stop Apex Graf debug

Jun 14th, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.35 KB | None | 0 0
  1. type: custom:grid-layout
  2. path: ""
  3. cards:
  4. - type: horizontal-stack
  5. cards:
  6. - type: custom:apexcharts-card
  7. header:
  8. title: Sell SOC Stop (00–24)
  9. show: true
  10. chart_type: line
  11. update_interval: 1h
  12. graph_span: 24h
  13. span:
  14. start: day
  15. apex_config:
  16. xaxis:
  17. type: datetime
  18. labels:
  19. datetimeFormatter:
  20. hour: HH:mm
  21. tickAmount: 24
  22. yaxis:
  23. min: 0
  24. max: 100
  25. stroke:
  26. curve: stepline
  27. series:
  28. - entity: sensor.sell_soc_stop_series
  29. name: SOC %
  30. type: line
  31. data_generator: |
  32. return entity.attributes.series.map(([timestamp, value]) => {
  33. return { x: new Date(timestamp).getTime(), y: value };
  34. });
  35. - type: custom:apexcharts-card
  36. header:
  37. title: Batterikapacitet
  38. show: true
  39. chart_type: line
  40. update_interval: 10m
  41. graph_span: 24h
  42. span:
  43. start: day
  44. apex_config:
  45. xaxis:
  46. type: datetime
  47. labels:
  48. datetimeFormatter:
  49. hour: HH:mm
  50. tickAmount: 24
  51. yaxis:
  52. min: 0
  53. max: 100
  54. stroke:
  55. curve: straight
  56. width: 2
  57. markers:
  58. size: 0
  59. series:
  60. - entity: sensor.esphome_web_b2bf74_sun12k_battery_capacity
  61. name: Batteri aktuelt
  62. type: line
  63. color: "#32CD32"
  64. fill_raw: last
  65. title: Battery SOC
  66.  
  67.  
  68. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  69.  
  70. Template sensor
  71. - sensor:
  72. - name: Sell SOC Stop Series
  73. unique_id: sell_soc_stop_series
  74. state: "ok"
  75. attributes:
  76. series: >
  77. {% set today = now().date().isoformat() %}
  78. [
  79. ["{{ today }}T00:00:00", {{ states('input_number.sell_soc_stop_0000_0100')|float }}],
  80. ["{{ today }}T01:00:00", {{ states('input_number.sell_soc_stop_0100_0200')|float }}],
  81. ["{{ today }}T02:00:00", {{ states('input_number.sell_soc_stop_0200_0300')|float }}],
  82. ["{{ today }}T03:00:00", {{ states('input_number.sell_soc_stop_0300_0400')|float }}],
  83. ["{{ today }}T04:00:00", {{ states('input_number.sell_soc_stop_0400_0500')|float }}],
  84. ["{{ today }}T05:00:00", {{ states('input_number.sell_soc_stop_0500_0600')|float }}],
  85. ["{{ today }}T06:00:00", {{ states('input_number.sell_soc_stop_0600_0700')|float }}],
  86. ["{{ today }}T07:00:00", {{ states('input_number.sell_soc_stop_0700_0800')|float }}],
  87. ["{{ today }}T08:00:00", {{ states('input_number.sell_soc_stop_0800_0900')|float }}],
  88. ["{{ today }}T09:00:00", {{ states('input_number.sell_soc_stop_0900_1000')|float }}],
  89. ["{{ today }}T10:00:00", {{ states('input_number.sell_soc_stop_1000_1100')|float }}],
  90. ["{{ today }}T11:00:00", {{ states('input_number.sell_soc_stop_1100_1200')|float }}],
  91. ["{{ today }}T12:00:00", {{ states('input_number.sell_soc_stop_1200_1300')|float }}],
  92. ["{{ today }}T13:00:00", {{ states('input_number.sell_soc_stop_1300_1400')|float }}],
  93. ["{{ today }}T14:00:00", {{ states('input_number.sell_soc_stop_1400_1500')|float }}],
  94. ["{{ today }}T15:00:00", {{ states('input_number.sell_soc_stop_1500_1600')|float }}],
  95. ["{{ today }}T16:00:00", {{ states('input_number.sell_soc_stop_1600_1700')|float }}],
  96. ["{{ today }}T17:00:00", {{ states('input_number.sell_soc_stop_1700_1800')|float }}],
  97. ["{{ today }}T18:00:00", {{ states('input_number.sell_soc_stop_1800_1900')|float }}],
  98. ["{{ today }}T19:00:00", {{ states('input_number.sell_soc_stop_1900_2000')|float }}],
  99. ["{{ today }}T20:00:00", {{ states('input_number.sell_soc_stop_2000_2100')|float }}],
  100. ["{{ today }}T21:00:00", {{ states('input_number.sell_soc_stop_2100_2200')|float }}],
  101. ["{{ today }}T22:00:00", {{ states('input_number.sell_soc_stop_2200_2300')|float }}],
  102. ["{{ today }}T23:00:00", {{ states('input_number.sell_soc_stop_2300_0000')|float }}]
  103. ]
  104.  
  105.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement