Energy, Gas and Cost Package

Hello,

A long time ago I found a post for created sensors from daily to yearly, history, costs and more data for creating your own energy cards.

I can not find the original maker or posts anymore (for the credits).

But HA has changed a lot and I did learn a bit haha, so i decided to rewrite the sensors and put it in a package, also created extra sensors for energy production.

I would like to share the Package so others can use it if they like (without the forum and sharing i never came as far as i am now with HA).

Card:

type: vertical-stack
cards:
  - type: custom:gap-card
    height: 5
  - type: horizontal-stack
    cards:
      - type: custom:apexcharts-card
        header:
          title: Energie verbruik
          show: true
          show_states: true
          colorize_states: false
        graph_span: 2h
        layout: minimal
        series:
          - entity: sensor.power_consumption_w
            name: ' '
            unit: ' Watt'
            color: '#00648e'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
        apex_config:
          stroke:
            show: true
          legend:
            show: false
          yaxis:
            show: false
          chart:
            height: 175px
      - type: custom:apexcharts-card
        header:
          title: Oplevering Zonnepanelen
          show: true
          show_states: true
          colorize_states: false
        graph_span: 2h
        layout: minimal
        series:
          - entity: sensor.solaredge_current_power
            name: ' '
            unit: ' Watt'
            color: '#ffaa5b'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
        apex_config:
          stroke:
            show: true
          legend:
            show: false
          yaxis:
            show: false
          chart:
            height: 175px
      - type: custom:apexcharts-card
        header:
          title: Netto verbruik
          show: true
          show_states: true
          colorize_states: false
        graph_span: 2h
        layout: minimal
        series:
          - entity: sensor.power_consumption_grid_pos
            name: ' '
            unit: ' Watt'
            color: '#9a001d'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
          - entity: sensor.power_consumption_grid_neg
            name: ' '
            unit: ' Watt'
            color: '#8756cb'
            opacity: 0.5
            type: area
            curve: smooth
            stroke_width: 2
        apex_config:
          stroke:
            show: true
          legend:
            show: false
          yaxis:
            show: false
          chart:
            height: 175px
      - type: entity
        entity: sensor.solaredge_storage_level
        name: Energieopslag
        state_color: true
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: custom:gap-card
        height: 20
      - type: custom:apexcharts-card
        graph_span: 4hours
        header:
          show: true
          show_states: true
          colorize_states: true
        series:
          - entity: sensor.power_consumption_w
            name: Energie verbruik
            color: '#00648e'
            opacity: 0.3
            type: area
          - entity: sensor.solaredge_current_power
            name: Zonne Energie
            color: '#ffaa5b'
            opacity: 0.4
            type: area
          - entity: sensor.power_consumption_grid_pos
            name: Netto verbruik
            color: '#9a001d'
            opacity: 0.3
            type: area
          - entity: sensor.power_consumption_grid_neg
            name: Netto Teruglevering
            color: '#8756cb'
            opacity: 0.3
            type: area
        now:
          show: true
          color: red
          label: Nu
        apex_config:
          stroke:
            show: true
            width: 2
            curve: smooth
          legend:
            show: true
          yaxis:
            show: true
          chart:
            height: 550px
        card_mod:
          style: |
            ha-card {
              font-size: 14px !important;
              box-shadow: none;
              border: 0px;
              --ha-card-border-width: 0px;
            }
      - type: custom:gap-card
        height: 5

The graph will show negative (production) energy but there is none atm.

type: horizontal-stack
cards:
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: entities
        entities:
          - type: divider
        title: Elektra
        icon: mdi:flash
        card_mod:
          class: content
          style: |
            ha-icon {
              --mdc-icon-size: 28px;
            }
      - type: gauge
        entity: sensor.electricity_meter_energieverbruik_w
        min: 0
        max: 10000
        segments:
          - from: 0
            color: green
          - from: 500
            color: yellow
          - from: 2000
            color: orange
          - from: 5000
            color: red
          - from: 10000
            color: '#820914'
        name: Stroom Gebruik
        card_mod:
          class: content
      - type: custom:gap-card
        height: 87
      - type: entities
        entities:
          - entity: sensor.average_energy_day
            name: Gemiddeld
            icon: mdi:home-analytics
          - entity: sensor.daily_energy_short
            name: Vandaag
            icon: mdi:flash
          - entity: sensor.today_energy_price
            name: Vandaag
            icon: mdi:currency-eur
        title: Vandaag
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.yesterday_energy_short
            name: Gisteren
            icon: mdi:flash
          - entity: sensor.yesterday_energy_price
            name: Gisteren
            icon: mdi:currency-eur
          - type: divider
        title: Gisteren
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.weekly_energy_short
            name: Deze week
            icon: mdi:flash
          - entity: sensor.week_energy_price
            name: Deze week
            icon: mdi:currency-eur
        title: Deze Week
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_week_energy_short
            name: Vorige week
            icon: mdi:flash
          - entity: sensor.last_week_energy_price
            name: Vorige week
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Week
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.monthly_energy_short
            name: Deze maand
            icon: mdi:flash
          - entity: sensor.month_energy_price
            name: Deze maand
            icon: mdi:currency-eur
        title: Deze Maand
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_month_energy_short
            name: Vorige maand
            icon: mdi:flash
          - entity: sensor.last_month_energy_price
            name: Vorige maand
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Maand
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.yearly_energy_short
            name: Dit jaar
            icon: mdi:flash
          - entity: sensor.year_energy_price
            name: Dit jaar
            icon: mdi:currency-eur
        title: Dit Jaar
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_year_energy_short
            name: Vorig jaar
            icon: mdi:power-plug
          - entity: sensor.last_year_energy_price
            name: Vorig jaar
            icon: mdi:currency-eur
        title: Vorig Jaar
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
    card_mod:
      style: |
        ha-card {
          width: 100% !important;
          margin: 0px 0px 0px -5px
        }
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: entities
        entities:
          - type: divider
        title: Gas
        icon: mdi:fire
        card_mod:
          class: content
          style: |
            ha-icon {
              --mdc-icon-size: 28px;
            }
      - type: custom:mini-graph-card
        entities:
          - entity: sensor.hourly_gas
            name: Gas per Uur
        name: Gas Gebruik
        align_state: center
        hour24: true
        hours_to_show: 24
        line_width: 2
        font_size: 100
        points_per_hour: 0.99
        animate: true
        show:
          graph: bar
          name: true
          icon: false
        color_thresholds:
          - value: 0
            color: green
          - value: 0.2
            color: orange
          - value: 0.45
            color: red
        card_mod:
          class: content
      - type: custom:gap-card
        height: 20
      - type: entities
        entities:
          - entity: sensor.average_gas_day
            name: Gemiddeld
            icon: mdi:home-analytics
          - entity: sensor.daily_gas_short
            name: Vandaag
            icon: mdi:fire
          - entity: sensor.today_gas_price
            name: Vandaag
            icon: mdi:currency-eur
        title: Vandaag
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.yesterday_gas_short
            name: Gisteren
            icon: mdi:fire
          - entity: sensor.yesterday_gas_price
            name: Gisteren
            icon: mdi:currency-eur
          - type: divider
        title: Gisteren
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.weekly_gas_short
            name: Deze week
            icon: mdi:fire
          - entity: sensor.week_gas_price
            name: Deze week
            icon: mdi:currency-eur
        title: Deze Week
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_week_gas_short
            name: Vorige week
            icon: mdi:fire
          - entity: sensor.last_week_gas_price
            name: Vorige week
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Week
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.monthly_gas_short
            name: Deze maand
            icon: mdi:fire
          - entity: sensor.month_gas_price
            name: Deze maand
            icon: mdi:currency-eur
        title: Deze Maand
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_month_gas_short
            name: Vorige maand
            icon: mdi:fire
          - entity: sensor.last_month_gas_price
            name: Vorige maand
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Maand
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.yearly_gas_short
            name: Dit jaar
            icon: mdi:fire
          - entity: sensor.year_gas_price
            name: Dit jaar
            icon: mdi:currency-eur
        title: Dit Jaar
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_year_gas_short
            name: Vorig jaar
            icon: mdi:fire
          - entity: sensor.last_year_gas_price
            name: Vorig jaar
            icon: mdi:currency-eur
        title: Vorig Jaar
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
    card_mod:
      style: |
        ha-card {
          width: 100% !important;
          margin: 0px 0px 0px 5px
        }

1 Like

Edit much of the code. removed short energy:

Part 1/2

---
#
# /config/integrations/custom_packages/energy_gas/energy_gas_data.yaml
#


##################################################################################################################
# Inputs
##################################################################################################################

# Inputs for the Energy and Gas Prices

input_number:

  # Input number: Energy and Gas Prices
  # These are the current Energy and Gas prices for the Energy Meter and HA Energy Dashboard.

  # All-in enkeltarief Stroom Euro per kWh
  energy_all_in_enkeltarief_stroom:
    name: "Energie Tarief - All-in Enkeltarief Stroom"
    initial: 0.374
    min: 0.000
    max: 0.900
    step: 0.001
    unit_of_measurement: "EUR/kWh"
    icon: mdi:flash
    mode: box

  # All-in enkeltarief Gas Euro per m3
  energy_all_in_enkeltarief_gas:
    name: "Energie Tarief - All-in Enkeltarief Gas"
    initial: 1.267
    min: 0.000
    max: 4.000
    step: 0.001
    unit_of_measurement: "EUR/m³"
    icon: mdi:fire
    mode: box

  # Netbeheerkosten Stroom per JAAR
  energy_netbeheerkosten_stroom:
    name: "Energie Tarief - Netbeheerkosten Stroom"
    initial: 325.89
    min: 0.00
    max: 500.00
    step: 0.01
    unit_of_measurement: "EUR"
    icon: mdi:flash
    mode: box

  # Netbeheerkosten Gas per JAAR
  energy_netbeheerkosten_gas:
    name: "Energie Tarief - Netbeheerkosten Gas"
    initial: 203.55
    min: 0.00
    max: 500.00
    step: 0.01
    unit_of_measurement: "EUR"
    icon: mdi:fire
    mode: box

  # Vaste Leveringskosten Stroom per JAAR
  energy_vaste_leveringskosten_stroom:
    name: "Energie Tarief - Vaste Leveringskosten Stroom"
    initial: 85.23
    min: 0.00
    max: 100.00
    step: 0.01
    unit_of_measurement: "EUR"
    icon: mdi:flash
    mode: box

  # Vaste Leveringskosten Gas per JAAR
  energy_vaste_leveringskosten_gas:
    name: "Energie Tarief - Vaste Leveringskosten Gas"
    initial: 85.23
    min: 0.00
    max: 100.00
    step: 0.01
    unit_of_measurement: "EUR"
    icon: mdi:fire
    mode: box

  # Vermindering Energiebelasting Stroom per JAAR
  energy_vermindering_energiebelasting_stroom:
    name: "Energie Tarief - Vermindering Energiebelasting Stroom"
    initial: -595.22
    min: -900.00
    max: 0.00
    step: 0.01
    unit_of_measurement: "EUR"
    icon: mdi:flash
    mode: box

  # All-in dubbeltarief daltarief (tarief 1) Stroom Euro per kWh (HA Energy Dashboard)
  ha_energy_all_in_dubbeltarief_dal_stroom:
    name: "Energie Tarief HA - All-in Dubbeltarief Dal Stroom"
    initial: 0.367465
    min: 0.000000
    max: 0.900000
    step: 0.000001
    unit_of_measurement: "EUR/kWh"
    icon: mdi:flash
    mode: box

  # All-in dubbeltarief (normaal)piektarief (tarief 2) Stroom Euro per kWh (HA Energy Dashboard)
  ha_energy_all_in_dubbeltarief_piek_stroom:
    name: "Energie Tarief HA - All-in Dubbeltarief Piek Stroom"
    initial: 0.380049
    min: 0.000000
    max: 0.900000
    step: 0.000001
    unit_of_measurement: "EUR/kWh"
    icon: mdi:flash
    mode: box

  # All-in Teruglevering enkeltarief Stroom Euro per kWh (HA Energy Dashboard)
  ha_energy_teruglevering_all_in_enkeltarief_stroom:
    name: "Energie Tarief HA - Teruglevering All-in Enkeltarief Stroom"
    initial: 0.070000
    min: 0.000000
    max: 0.900000
    step: 0.000001
    unit_of_measurement: "EUR/kWh"
    icon: mdi:solar-power
    mode: box

  # All-in enkeltarief Gas Euro per m3 (HA Energy Dashboard)
  ha_energy_all_in_enkeltarief_gas:
    name: "Energie Tarief HA - All-in Enkeltarief Gas"
    initial: 1.268927
    min: 0.000000
    max: 4.000000
    step: 0.000001
    unit_of_measurement: "EUR/m³"
    icon: mdi:fire
    mode: box


##################################################################################################################
# Utility Meter
##################################################################################################################

utility_meter:

  ###### DSMR METER READINGS ######

  # Hourly
  hourly_energy_offpeak:
    name: "Hourly Energy Offpeak"
    source: sensor.electricity_meter_energieverbruik_tarief_1
    cycle: hourly
  hourly_energy_peak:
    name: "Hourly Energy Peak"
    source: sensor.electricity_meter_energieverbruik_tarief_2
    cycle: hourly
  # Return
  hourly_energy_returned_offpeak:
    name: "Hourly Energy Returned Offpeak"
    source: sensor.electricity_meter_energieproductie_tarief_1
    cycle: hourly
  hourly_energy_returned_peak:
    name: "Hourly Energy Returned Peak"
    source: sensor.electricity_meter_energieproductie_tarief_2
    cycle: hourly
  # Gas
  hourly_gas:
    name: "Hourly Gas"
    source: sensor.gas_meter_gasverbruik
    cycle: hourly

  # Daily
  daily_energy_offpeak:
    name: "Daily Energy Offpeak"
    source: sensor.electricity_meter_energieverbruik_tarief_1
    cycle: daily
  daily_energy_peak:
    name: "Daily Energy Peak"
    source: sensor.electricity_meter_energieverbruik_tarief_2
    cycle: daily
  # Return
  daily_energy_returned_offpeak:
    name: "Daily Energy Returned Offpeak"
    source: sensor.electricity_meter_energieproductie_tarief_1
    cycle: daily
  daily_energy_returned_peak:
    name: "Daily Energy Returned Peak"
    source: sensor.electricity_meter_energieproductie_tarief_2
    cycle: daily
  # Gas
  daily_gas:
    name: "Daily Gas"
    source: sensor.gas_meter_gasverbruik
    cycle: daily

  # Weekly
  weekly_energy_offpeak:
    name: "Weekly Energy Offpeak"
    source: sensor.electricity_meter_energieverbruik_tarief_1
    cycle: weekly
  weekly_energy_peak:
    name: "Weekly Energy Peak"
    source: sensor.electricity_meter_energieverbruik_tarief_2
    cycle: weekly
  # Return
  weekly_energy_returned_offpeak:
    name: "Weekly Energy Returned Offpeak"
    source: sensor.electricity_meter_energieproductie_tarief_1
    cycle: weekly
  weekly_energy_returned_peak:
    name: "Weekly Energy Returned Peak"
    source: sensor.electricity_meter_energieproductie_tarief_2
    cycle: weekly
  # Gas
  weekly_gas:
    name: "Weekly Gas"
    source: sensor.gas_meter_gasverbruik
    cycle: weekly

  # Monthly
  monthly_energy_offpeak:
    name: "Monthly Energy Offpeak"
    source: sensor.electricity_meter_energieverbruik_tarief_1
    cycle: monthly
  monthly_energy_peak:
    name: "Monthly Energy Peak"
    source: sensor.electricity_meter_energieverbruik_tarief_2
    cycle: monthly
  # Return
  monthly_energy_returned_offpeak:
    name: "Monthly Energy Returned Offpeak"
    source: sensor.electricity_meter_energieproductie_tarief_1
    cycle: monthly
  monthly_energy_returned_peak:
    name: "Monthly Energy Returned Peak"
    source: sensor.electricity_meter_energieproductie_tarief_2
    cycle: monthly
  # Gas
  monthly_gas:
    name: "Monthly Gas"
    source: sensor.gas_meter_gasverbruik
    cycle: monthly

  # Yearly
  yearly_energy_offpeak:
    name: "Yearly Energy Offpeak"
    source: sensor.electricity_meter_energieverbruik_tarief_1
    cycle: yearly
  yearly_energy_peak:
    name: "Yearly Energy Peak"
    source: sensor.electricity_meter_energieverbruik_tarief_2
    cycle: yearly
  # Return
  yearly_energy_returned_offpeak:
    name: "Yearly Energy Returned Offpeak"
    source: sensor.electricity_meter_energieproductie_tarief_1
    cycle: yearly
  yearly_energy_returned_peak:
    name: "Yearly Energy Returned Peak"
    source: sensor.electricity_meter_energieproductie_tarief_2
    cycle: yearly
  # Gas
  yearly_gas:
    name: "Yearly Gas"
    source: sensor.gas_meter_gasverbruik
    cycle: yearly



##################################################################################################################
# Template Sensor
##################################################################################################################

template:

  # Energie DSMR Readings and Prices

  - sensor:
  
  # CALCULATION TARIF LOW + NORMAL

  # Hourly Energy
      - name: "Hourly Energy"
        unique_id: "hourly_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.hourly_energy_offpeak')|float + states('sensor.hourly_energy_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.hourly_energy_offpeak') and has_value('sensor.hourly_energy_peak') }}"
      
  # Return
      - name: "Hourly Energy Returned"
        unique_id: "hourly_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.hourly_energy_returned_offpeak')|float + states('sensor.hourly_energy_returned_peak')|float ) | round(1) }}"
        availability: "{{ states('sensor.hourly_energy_returned_offpeak')|is_number and states('sensor.hourly_energy_returned_peak')|is_number }}"

  # Daily Energy
      - name: "Daily Energy"
        unique_id: "daily_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.daily_energy_offpeak')|float + states('sensor.daily_energy_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.daily_energy_offpeak') and has_value('sensor.daily_energy_peak') }}"
  # Return
      - name: "Daily Energy Returned"
        unique_id: "daily_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.daily_energy_returned_offpeak')|float + states('sensor.daily_energy_returned_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.daily_energy_returned_offpeak') and has_value('sensor.daily_energy_returned_peak') }}"

  # Weekly Energy
      - name: "Weekly Energy"
        unique_id: "weekly_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.weekly_energy_offpeak')|float + states('sensor.weekly_energy_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.weekly_energy_offpeak') and has_value('sensor.weekly_energy_peak') }}"
  # Return
      - name: "Weekly Energy Returned"
        unique_id: "weekly_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.weekly_energy_returned_offpeak')|float + states('sensor.weekly_energy_returned_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.weekly_energy_returned_offpeak') and has_value('sensor.weekly_energy_returned_peak') }}"

  # Monthly Energy
      - name: "Monthly Energy"
        unique_id: "monthly_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.monthly_energy_offpeak')|float + states('sensor.monthly_energy_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.monthly_energy_offpeak') and has_value('sensor.monthly_energy_peak') }}"
  # Return
      - name: "Monthly Energy Returned"
        unique_id: "monthly_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.monthly_energy_returned_offpeak')|float + states('sensor.monthly_energy_returned_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.monthly_energy_returned_offpeak') and has_value('sensor.monthly_energy_returned_peak') }}"

  # Yearly Energy
      - name: "Yearly Energy"
        unique_id: "yearly_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.yearly_energy_offpeak')|float + states('sensor.yearly_energy_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.yearly_energy_offpeak') and has_value('sensor.yearly_energy_peak') }}"
  # Return
      - name: "Yearly Energy Returned"
        unique_id: "yearly_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total_increasing
        state: "{{ ( states('sensor.yearly_energy_returned_offpeak')|float + states('sensor.yearly_energy_returned_peak')|float ) | round(1) }}"
        availability: "{{ has_value('sensor.yearly_energy_returned_offpeak') and has_value('sensor.yearly_energy_returned_peak') }}"


  ## LAST PERIODS ENERGY ##

  # Yesterday Energy
      - name: "Yesterday Energy"
        unique_id: "yesterday_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.daily_energy_offpeak','last_period')|float + state_attr('sensor.daily_energy_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.daily_energy_offpeak','last_period')|is_number and state_attr('sensor.daily_energy_peak','last_period')|is_number }}"
  # Return
      - name: "Yesterday Energy Returned"
        unique_id: "yesterday_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.daily_energy_returned_offpeak','last_period')|float + state_attr('sensor.daily_energy_returned_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.daily_energy_returned_offpeak','last_period')|is_number and state_attr('sensor.daily_energy_returned_peak','last_period')|is_number }}"

  # Last Week Energy
      - name: "Last Week Energy"
        unique_id: "last_week_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.weekly_energy_offpeak','last_period')|float + state_attr('sensor.weekly_energy_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.weekly_energy_offpeak','last_period')|is_number and state_attr('sensor.weekly_energy_peak','last_period')|is_number }}"
  # Return
      - name: "Last Week Energy Returned"
        unique_id: "last_week_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.weekly_energy_returned_offpeak','last_period')|float + state_attr('sensor.weekly_energy_returned_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.weekly_energy_returned_offpeak','last_period')|is_number and state_attr('sensor.weekly_energy_returned_peak','last_period')|is_number }}"

  # Last Month Energy
      - name: "Last Month Energy"
        unique_id: "last_month_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.monthly_energy_offpeak','last_period')|float + state_attr('sensor.monthly_energy_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.monthly_energy_offpeak','last_period')|is_number and state_attr('sensor.monthly_energy_peak','last_period')|is_number }}"
  # Return
      - name: "Last Month Energy Returned"
        unique_id: "last_month_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.monthly_energy_returned_offpeak','last_period')|float + state_attr('sensor.monthly_energy_returned_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.monthly_energy_returned_offpeak','last_period')|is_number and state_attr('sensor.monthly_energy_returned_peak','last_period')|is_number }}"

  # Last Year Energy
      - name: "Last Year Energy"
        unique_id: "last_year_energy"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.yearly_energy_offpeak','last_period')|float + state_attr('sensor.yearly_energy_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.yearly_energy_offpeak','last_period')|is_number and state_attr('sensor.yearly_energy_peak','last_period')|is_number }}"
  # Return
      - name: "Last Year Energy Returned"
        unique_id: "last_year_energy_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: "{{ ( state_attr('sensor.yearly_energy_returned_offpeak','last_period')|float + state_attr('sensor.yearly_energy_returned_peak','last_period')|float ) | round(1) }}"
        availability: "{{ state_attr('sensor.yearly_energy_returned_offpeak','last_period')|is_number and state_attr('sensor.yearly_energy_returned_peak','last_period')|is_number }}"


  ## LAST PERIODS GAS ##

  # Yesterday Gas
      - name: "Yesterday Gas"
        unique_id: "yesterday_gas"
        unit_of_measurement: "m³"
        device_class: gas
        state_class: total
        state: "{{ state_attr('sensor.daily_gas','last_period')|float | round(2) }}"
        availability: "{{ state_attr('sensor.daily_gas','last_period') | is_number }}"
  # Last Week Gas
      - name: "Last Week Gas"
        unique_id: "last_week_gas"
        unit_of_measurement: "m³"
        device_class: gas
        state_class: total
        state: "{{ state_attr('sensor.weekly_gas','last_period')|float | round(2) }}"
        availability: "{{ state_attr('sensor.weekly_gas','last_period') | is_number }}"
  # Last Month Gas
      - name: "Last Month Gas"
        unique_id: "last_month_gas"
        unit_of_measurement: "m³"
        device_class: gas
        state_class: total
        state: "{{ state_attr('sensor.monthly_gas','last_period')|float | round(2) }}"
        availability: "{{ state_attr('sensor.monthly_gas','last_period') | is_number }}"
  # Last Year Gas
      - name: "Last Year Gas"
        unique_id: "last_year_gas"
        unit_of_measurement: "m³"
        device_class: gas
        state_class: total
        state: "{{ state_attr('sensor.yearly_gas','last_period')|float | round(2) }}"
        availability: "{{ state_attr('sensor.yearly_gas','last_period') | is_number }}"

1 Like

Part 2/2:

 ## Gemiddelde over een maand ##

  # Gemiddeld Energy Day      
      - name: "Average Energy Day"
        unique_id: "average_energy_day"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: >
          {% set a = states('sensor.last_month_energy') | float %}
          {{ (a / 30.41) | round(1) }}
        availability: "{{ has_value('sensor.last_month_energy') }}"
  # Gemiddeld Energy Return Day
      - name: "Average Energy Day Returned"
        unique_id: "average_energy_day_returned"
        unit_of_measurement: "kWh"
        device_class: energy
        state_class: total
        state: >
          {% set a = states('sensor.last_month_energy_returned') | float %}
          {{ (a / 30.41) | round(1) }}
        availability: "{{ has_value('sensor.last_month_energy_returned') }}"

  # Gemiddeld Gas Day
      - name: "Average Gas Day"
        unique_id: "average_gas_day"
        unit_of_measurement: "m³"
        device_class: gas
        state_class: total
        state: >
          {% set a = states('sensor.last_month_gas') | float %}
          {{ (a / 30.41) | round(1) }}
        availability: "{{ has_value('sensor.last_month_gas') }}"



  ## CACULATIONS - kWh to Watt ##

  # Current Energy kWh to Watts
      - name: "Electricity Meter Energieverbruik (W)"
        unique_id: "electricity_meter_energieverbruik_w"
        unit_of_measurement: "W"
        device_class: power
        state_class: measurement
        state: "{{ ( states('sensor.electricity_meter_energieverbruik') | float(0) * 1000 ) | round(0) }}"
        availability: "{{ has_value('sensor.electricity_meter_energieverbruik') }}"



## Kosten gabaseerd op Levercancier Prijzen ##

  ## Energie ##

  # Vandaag Energie Kosten
      - name: "Today Energy Price"
        unique_id: "today_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.daily_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float / 365 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float / 365 %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float / 365 %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.daily_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"

  # Gisteren Energie Kosten
      - name: "Yesterday Energy Price"
        unique_id: "yesterday_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.yesterday_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float / 365 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float / 365 %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float / 365 %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.yesterday_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"

  # Deze Week Energie Kosten
      - name: "Week Energy Price"
        unique_id: "week_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.weekly_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float / 52 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float / 52 %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float / 52 %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.weekly_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"

  # Vorige Week Energie Kosten
      - name: "Last Week Energy Price"
        unique_id: "last_week_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.last_week_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float / 52 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float / 52 %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float / 52 %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.last_week_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"

  # Deze Maand Energie Kosten
      - name: "Month Energy Price"
        unique_id: "month_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.monthly_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float / 12 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float / 12 %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float / 12 %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.monthly_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"

  # Vorige Maand Energie Kosten
      - name: "Last Month Energy Price"
        unique_id: "last_month_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.last_month_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float / 12 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float / 12 %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float / 12 %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.last_month_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"

  # Dit Jaar Energie Kosten
      - name: "Year Energy Price"
        unique_id: "year_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.yearly_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.yearly_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"

  # Vorig Jaar Energie Kosten
      - name: "Last Year Energy Price"
        unique_id: "last_year_energy_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.last_year_energy') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_stroom') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_stroom') | float %}
          {% set d = states('input_number.energy_vaste_leveringskosten_stroom') | float %}
          {% set e = states('input_number.energy_vermindering_energiebelasting_stroom') | float %}
          {{ ((((a * b) + c) + d) + e) | round(2) }}
        availability: "{{ has_value('sensor.last_year_energy') and has_value('input_number.energy_all_in_enkeltarief_stroom') and has_value('input_number.energy_netbeheerkosten_stroom') and 
        has_value('input_number.energy_vaste_leveringskosten_stroom') and has_value('input_number.energy_vermindering_energiebelasting_stroom') }}"


  ## Gas ##

  # Vandaag Gas Kosten
      - name: "Today Gas Price"
        unique_id: "today_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.daily_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float / 365 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float / 365 %}
          {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.daily_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"

  # Gisteren Gas Kosten
      - name: "Yesterday Gas Price"
        unique_id: "yesterday_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.yesterday_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float / 365 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float / 365 %}
          {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.yesterday_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"

  # Deze Week Gas Kosten
      - name: "Week Gas Price"
        unique_id: "week_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.weekly_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float / 52 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float / 52 %}
          {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.weekly_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"

  # Vorige Week Gas Kosten
      - name: "Last Week Gas Price"
        unique_id: "last_week_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.last_week_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float / 52 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float / 52 %}
          {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.last_week_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"
  
  
  # Deze Maand Gas Kosten
      - name: "Month Gas Price"
        unique_id: "month_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.monthly_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float / 12 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float / 12 %}
          {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.monthly_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"

  # Vorige Maand Gas Kosten
      - name: "Last Month Gas Price"
        unique_id: "last_month_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.last_month_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float / 12 %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float / 12 %}
          {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.last_month_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"

  # Dit Jaar Gas Kosten
      - name: "Year Gas Price"
        unique_id: "year_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.yearly_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float %}
           {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.yearly_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"

  # Vorig Jaar Gas Kosten
      - name: "Last Year Gas Price"
        unique_id: "last_year_gas_price"
        unit_of_measurement: "EUR"
        device_class: monetary
        state_class: total
        state: >
          {% set a = states('sensor.last_year_gas') | float %}
          {% set b = states('input_number.energy_all_in_enkeltarief_gas') | float %}
          {% set c = states('input_number.energy_netbeheerkosten_gas') | float %}
          {% set d = states('input_number.energy_vaste_leveringskosten_gas') | float %}
          {{ (((a * b) + c) + d) | round(2) }}
        availability: "{{ has_value('sensor.last_year_gas') and has_value('input_number.energy_all_in_enkeltarief_gas') and has_value('input_number.energy_netbeheerkosten_gas') and 
        has_value('input_number.energy_vaste_leveringskosten_gas') }}"

HI Rick ,

Can you tell me where in which dir all this must put in , with other words , what must we put in the Configuration.yaml and what elswhere ??
Have try the last weeks , boy no result
waiting your comment ,
Thanks in advance
With kind regards
Tolwan

I have put this in

\Config\integrations\custom_packages\energy_gas

filename: energy_gas_data.yaml

and in the configuration.yaml put this:
packages: !include_dir_named integrations

create the folders if you not have them yet.

Thanks Rick , wil try to get it running tonight :slight_smile:

Hi Rick ,

Get this error , have NO idea what to do with it

packages: !include_dir_named integrations
Is in the Configuration.yaml

Is it under ‘homeassistant’ ?

Packages - Home Assistant (home-assistant.io)

homeassistant:
  name: Home
  latitude: !secret latitude
  longitude: !secret longitude
  elevation: !secret elevation
  radius: 20
  unit_system: metric
  temperature_unit: C
  currency: EUR
  country: NL
  time_zone: Europe/Amsterdam
  internal_url: !secret internal_url_https
  allowlist_external_dirs:
    - "/config"
    - "/tmp"

  # Load packages integrations and custom packages
  packages: !include_dir_named integrations

Yes , now i have NO errors , Thanks .
I have to change my Helpers to your names , and then i hope it will work ,
Before i forget it , on which card did you view this …

Thanks in advance

HI Rick ,
And i hope my last question :slight_smile:
Where can i find below ,

Till now i cannot select them for vewing the result :frowning:

Yesterday Gas

  - name: "Yesterday Gas"
    unique_id: "yesterday_gas"
    unit_of_measurement: "m³"

Or i have not the right Card

you need to make the cards in lovelace.

Example

type: horizontal-stack
cards:
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: entities
        entities:
          - type: divider
        title: Elektra
        icon: mdi:flash
        card_mod:
          class: content
          style: |
            ha-icon {
              --mdc-icon-size: 28px !important;
            }
      - type: gauge
        entity: sensor.electricity_meter_energieverbruik_w
        min: 0
        max: 10000
        segments:
          - from: 0
            color: green
          - from: 500
            color: yellow
          - from: 2000
            color: orange
          - from: 5000
            color: red
          - from: 10000
            color: "#820914"
        name: Stroom Gebruik
        card_mod:
          class: content
      - type: custom:gap-card
        height: 87
      - type: entities
        entities:
          - entity: sensor.average_energy_day
            name: Gemiddeld
            icon: mdi:home-analytics
          - entity: sensor.daily_energy
            name: Vandaag
            icon: mdi:flash
          - entity: sensor.today_energy_price
            name: Vandaag
            icon: mdi:currency-eur
        title: Vandaag
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.yesterday_energy
            name: Gisteren
            icon: mdi:flash
          - entity: sensor.yesterday_energy_price
            name: Gisteren
            icon: mdi:currency-eur
          - type: divider
        title: Gisteren
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.weekly_energy
            name: Deze week
            icon: mdi:flash
          - entity: sensor.week_energy_price
            name: Deze week
            icon: mdi:currency-eur
        title: Deze Week
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_week_energy
            name: Vorige week
            icon: mdi:flash
          - entity: sensor.last_week_energy_price
            name: Vorige week
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Week
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.monthly_energy
            name: Deze maand
            icon: mdi:flash
          - entity: sensor.month_energy_price
            name: Deze maand
            icon: mdi:currency-eur
        title: Deze Maand
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_month_energy
            name: Vorige maand
            icon: mdi:flash
          - entity: sensor.last_month_energy_price
            name: Vorige maand
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Maand
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.yearly_energy
            name: Dit jaar
            icon: mdi:flash
          - entity: sensor.year_energy_price
            name: Dit jaar
            icon: mdi:currency-eur
        title: Dit Jaar
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_year_energy
            name: Vorig jaar
            icon: mdi:power-plug
          - entity: sensor.last_year_energy_price
            name: Vorig jaar
            icon: mdi:currency-eur
        title: Vorig Jaar
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
    card_mod:
      style: |
        ha-card {
          width: 100% !important;
          margin: 0px 0px 0px -5px !important;
        }
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: entities
        entities:
          - type: divider
        title: Gas
        icon: mdi:fire
        card_mod:
          class: content
          style: |
            ha-icon {
              --mdc-icon-size: 28px !important;
            }
      - type: custom:mini-graph-card
        entities:
          - entity: sensor.hourly_gas
            name: Gas per Uur
        name: Gas Gebruik
        align_state: center
        hour24: true
        hours_to_show: 24
        line_width: 2
        font_size: 100
        points_per_hour: 0.99
        animate: true
        show:
          graph: bar
          name: true
          icon: false
        color_thresholds:
          - value: 0
            color: green
          - value: 0.2
            color: orange
          - value: 0.45
            color: red
        card_mod:
          class: content
      - type: custom:gap-card
        height: 20
      - type: entities
        entities:
          - entity: sensor.average_gas_day
            name: Gemiddeld
            icon: mdi:home-analytics
          - entity: sensor.daily_gas
            name: Vandaag
            icon: mdi:fire
          - entity: sensor.today_gas_price
            name: Vandaag
            icon: mdi:currency-eur
        title: Vandaag
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.yesterday_gas
            name: Gisteren
            icon: mdi:fire
          - entity: sensor.yesterday_gas_price
            name: Gisteren
            icon: mdi:currency-eur
          - type: divider
        title: Gisteren
        state_color: false
        show_header_toggle: false
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.weekly_gas
            name: Deze week
            icon: mdi:fire
          - entity: sensor.week_gas_price
            name: Deze week
            icon: mdi:currency-eur
        title: Deze Week
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_week_gas
            name: Vorige week
            icon: mdi:fire
          - entity: sensor.last_week_gas_price
            name: Vorige week
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Week
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.monthly_gas
            name: Deze maand
            icon: mdi:fire
          - entity: sensor.month_gas_price
            name: Deze maand
            icon: mdi:currency-eur
        title: Deze Maand
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_month_gas
            name: Vorige maand
            icon: mdi:fire
          - entity: sensor.last_month_gas_price
            name: Vorige maand
            icon: mdi:currency-eur
          - type: divider
        title: Vorige Maand
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
      - type: entities
        entities:
          - entity: sensor.yearly_gas
            name: Dit jaar
            icon: mdi:fire
          - entity: sensor.year_gas_price
            name: Dit jaar
            icon: mdi:currency-eur
        title: Dit Jaar
        card_mod:
          class: content-entities
      - type: entities
        entities:
          - entity: sensor.last_year_gas
            name: Vorig jaar
            icon: mdi:fire
          - entity: sensor.last_year_gas_price
            name: Vorig jaar
            icon: mdi:currency-eur
        title: Vorig Jaar
        card_mod:
          class: content-entities
      - type: custom:gap-card
        height: 15
    card_mod:
      style: |
        ha-card {
          width: 100% !important;
          margin: 0px 0px 0px 5px !important;
        }

just use entitie cards

Hi Rick ,

So far so good , but what i don’t get is how i get following visible
I don’t know how this is working ,
- name: “Daily Energy”
unique_id: “daily_energy”
if i look on the card i see this

Must i make a Helper with this name or ??

Please give me a example more
thanks in advance
Tolwan

Goedemorgen Rick ,

Zou je mijn laatste vraag nog willen beantwoorden , wil het graag werkend hebben
Moet ik helpers aanmaken of ??
Zou je me jou card willen sturen , dan kan ik em aanpassen , maar weet dat die dan moet werken
Alvast Bedankt
Tolwan

Rick ,
Would you be so kind :thinking:

Is er iets wat wel werkt van de sensoren. Ik denk dat je een andere energy integratie gebruikt dan DSMR en dan moet je elke entiteit veranderen met de entiteiten die je wel hebt vanuit je integratie

Ik volg dit even , en dan binnenkort maar even stoeien ermee :grin: