Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:grid-layout
- path: ""
- cards:
- - type: horizontal-stack
- cards:
- - type: custom:apexcharts-card
- header:
- title: Sell SOC Stop (00–24)
- show: true
- chart_type: line
- update_interval: 1h
- graph_span: 24h
- span:
- start: day
- apex_config:
- xaxis:
- type: datetime
- labels:
- datetimeFormatter:
- hour: HH:mm
- tickAmount: 24
- yaxis:
- min: 0
- max: 100
- stroke:
- curve: stepline
- series:
- - entity: sensor.sell_soc_stop_series
- name: SOC %
- type: line
- data_generator: |
- return entity.attributes.series.map(([timestamp, value]) => {
- return { x: new Date(timestamp).getTime(), y: value };
- });
- - type: custom:apexcharts-card
- header:
- title: Batterikapacitet
- show: true
- chart_type: line
- update_interval: 10m
- graph_span: 24h
- span:
- start: day
- apex_config:
- xaxis:
- type: datetime
- labels:
- datetimeFormatter:
- hour: HH:mm
- tickAmount: 24
- yaxis:
- min: 0
- max: 100
- stroke:
- curve: straight
- width: 2
- markers:
- size: 0
- series:
- - entity: sensor.esphome_web_b2bf74_sun12k_battery_capacity
- name: Batteri aktuelt
- type: line
- color: "#32CD32"
- fill_raw: last
- title: Battery SOC
- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- Template sensor
- - sensor:
- - name: Sell SOC Stop Series
- unique_id: sell_soc_stop_series
- state: "ok"
- attributes:
- series: >
- {% set today = now().date().isoformat() %}
- [
- ["{{ today }}T00:00:00", {{ states('input_number.sell_soc_stop_0000_0100')|float }}],
- ["{{ today }}T01:00:00", {{ states('input_number.sell_soc_stop_0100_0200')|float }}],
- ["{{ today }}T02:00:00", {{ states('input_number.sell_soc_stop_0200_0300')|float }}],
- ["{{ today }}T03:00:00", {{ states('input_number.sell_soc_stop_0300_0400')|float }}],
- ["{{ today }}T04:00:00", {{ states('input_number.sell_soc_stop_0400_0500')|float }}],
- ["{{ today }}T05:00:00", {{ states('input_number.sell_soc_stop_0500_0600')|float }}],
- ["{{ today }}T06:00:00", {{ states('input_number.sell_soc_stop_0600_0700')|float }}],
- ["{{ today }}T07:00:00", {{ states('input_number.sell_soc_stop_0700_0800')|float }}],
- ["{{ today }}T08:00:00", {{ states('input_number.sell_soc_stop_0800_0900')|float }}],
- ["{{ today }}T09:00:00", {{ states('input_number.sell_soc_stop_0900_1000')|float }}],
- ["{{ today }}T10:00:00", {{ states('input_number.sell_soc_stop_1000_1100')|float }}],
- ["{{ today }}T11:00:00", {{ states('input_number.sell_soc_stop_1100_1200')|float }}],
- ["{{ today }}T12:00:00", {{ states('input_number.sell_soc_stop_1200_1300')|float }}],
- ["{{ today }}T13:00:00", {{ states('input_number.sell_soc_stop_1300_1400')|float }}],
- ["{{ today }}T14:00:00", {{ states('input_number.sell_soc_stop_1400_1500')|float }}],
- ["{{ today }}T15:00:00", {{ states('input_number.sell_soc_stop_1500_1600')|float }}],
- ["{{ today }}T16:00:00", {{ states('input_number.sell_soc_stop_1600_1700')|float }}],
- ["{{ today }}T17:00:00", {{ states('input_number.sell_soc_stop_1700_1800')|float }}],
- ["{{ today }}T18:00:00", {{ states('input_number.sell_soc_stop_1800_1900')|float }}],
- ["{{ today }}T19:00:00", {{ states('input_number.sell_soc_stop_1900_2000')|float }}],
- ["{{ today }}T20:00:00", {{ states('input_number.sell_soc_stop_2000_2100')|float }}],
- ["{{ today }}T21:00:00", {{ states('input_number.sell_soc_stop_2100_2200')|float }}],
- ["{{ today }}T22:00:00", {{ states('input_number.sell_soc_stop_2200_2300')|float }}],
- ["{{ today }}T23:00:00", {{ states('input_number.sell_soc_stop_2300_0000')|float }}]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement