elradix

package_p1.yaml

Jul 22nd, 2021
963
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. # HomeWizard P1 meter
  3.  
  4.  
  5. input_number:
  6.     t2_energy_cost:
  7.       name: Stroom import nomaal
  8.       mode: box
  9.       min: 0
  10.       max: 100
  11.       unit_of_measurement: "€/kWh"
  12.       icon: mdi:currency-eur
  13.  
  14.     t1_energy_cost:
  15.       name: Stroom import dal
  16.       mode: box
  17.       min: 0
  18.       max: 100
  19.       unit_of_measurement: "€/kWh"
  20.       icon: mdi:currency-eur
  21.  
  22.     gas_energy_cost:
  23.       name: Gas
  24.       mode: box
  25.       min: 0
  26.       max: 100
  27.       unit_of_measurement: "€/m3"
  28.       icon: mdi:currency-eur
  29.  
  30.  
  31. utility_meter:
  32. #. solaredge
  33.   daily_solar_live:
  34.     source: sensor.solaredge_dc_power
  35.     cycle: daily
  36.   weekly_solar_live:
  37.     source: sensor.solaredge_dc_power
  38.     cycle: weekly
  39.   montlhy_solar_live:
  40.     source: sensor.solaredge_dc_power
  41.     cycle: monthly
  42.    
  43.   solar_production_daily:
  44.     source: sensor.solaredge_lifetime_production
  45.     cycle: daily
  46.   solar_production_hourly:
  47.     source: sensor.solaredge_lifetime_production
  48.     cycle: hourly
  49.   solar_production_weekly:
  50.     source: sensor.solaredge_lifetime_production
  51.     cycle: weekly
  52.   solar_production_monthly:
  53.     source: sensor.solaredge_lifetime_production
  54.     cycle: monthly
  55.    
  56.   energy_netto_dagelijks:
  57.     source: sensor.net_productie
  58.     cycle: daily
  59.    
  60.   energy_netto_wekelijks:
  61.     source: sensor.net_productie
  62.     cycle: weekly
  63.    
  64.   energy_netto_maandelijks:
  65.     source: sensor.net_productie
  66.     cycle: monthly
  67.    
  68. # p1. meter
  69.  
  70.   daily_energy_peak:
  71.     source: sensor.p1_meter_total_power_import_t2
  72.     cycle: daily
  73.   kwartierpiek_t1:
  74.     source: sensor.p1_meter_total_power_import_t2
  75.     cycle: quarter-hourly
  76.   daily_injection_peak:
  77.     source: sensor.p1_meter_total_power_export_t1
  78.     cycle: daily    
  79.   daily_injection_offpeak:
  80.     source: sensor.p1_meter_total_power_export_t2
  81.     cycle: daily  
  82.   weekly_energy_peak:
  83.     source: sensor.p1_meter_total_power_import_t2
  84.     cycle: weekly
  85.   monthly_energy_peak:
  86.     source: sensor.p1_meter_total_power_import_t2
  87.     cycle: monthly
  88.   daily_energy_offpeak:
  89.     source: sensor.p1_meter_total_power_import_t1
  90.     cycle: daily
  91.   weekly_energy_offpeak:
  92.     source: sensor.p1_meter_total_power_import_t1
  93.     cycle: weekly
  94.   monthly_energy_offpeak:
  95.     source: sensor.p1_meter_total_power_import_t1
  96.     cycle: monthly
  97.  
  98.   energy_import_t2_dagelijks:
  99.     source: sensor.p1_meter_total_power_import_t2
  100.     cycle: daily
  101.   energy_import_t1_dagelijks:
  102.     source: sensor.p1_meter_total_power_import_t1
  103.     cycle: daily
  104.    
  105.   energy_import_t2_wekelijks:
  106.     source: sensor.p1_meter_total_power_import_t2
  107.     cycle: weekly
  108.  
  109.   energy_import_t1_wekelijks:
  110.     source: sensor.p1_meter_total_power_import_t1
  111.     cycle: weekly  
  112.  
  113.   energy_import_t2_maandelijks:
  114.     source: sensor.p1_meter_total_power_import_t2
  115.     cycle: monthly
  116.  
  117.   energy_import_t1_maandelijks:
  118.     source: sensor.p1_meter_total_power_import_t1
  119.     cycle: monthly  
  120.  
  121.  
  122. #  energy_export_t2_dagelijks:
  123. #    source: sensor.p1_meter_total_power_export_t2_kwh
  124. #    cycle: daily
  125.  
  126. #  energy_export_t1_dagelijks:
  127. #    source: sensor.p1_meter_total_power_export_t1_kwh
  128. #    cycle: daily
  129.  
  130.   energy_gas_dagelijks:
  131.     source: sensor.p1_meter_total_gas
  132.     cycle: daily
  133.    
  134.   energy_gas_wekelijks:
  135.     source: sensor.p1_meter_total_gas
  136.     cycle: weekly
  137.    
  138.   energy_gas_maandelijks:
  139.     source: sensor.p1_meter_total_gas
  140.     cycle: monthly  
  141.  
  142.  
  143.  
  144.  
  145.  
  146. ## P1
  147.  
  148.  
  149.  
  150.  
  151. sensor:
  152. - platform: template
  153.   sensors:
  154.  
  155.     net_productie:
  156.       friendly_name: Netto vermogen
  157.       unit_of_measurement: W
  158.       value_template: "{{ ((states('sensor.current_power_export')|float + states('sensor.solaredge_dc_power')|float)) | round(3) }}"
  159.  
  160.     net_zelfverbruik:
  161.       friendly_name: Zelfverbruik
  162.       unit_of_measurement: "%"
  163.      # value_template: "{{ (states('sensor.net_productie')|float / states('sensor.solaredge_dc_power')|float)  | round(3) * 100|float }}"
  164.       value_template: >-
  165.           {% if (states('sensor.net_productie') | float > 0) %}
  166.             {{ (states('sensor.net_productie')|float / states('sensor.solaredge_dc_power')|float)  | round(1) * 100|float }}
  167.           {% else %}
  168.             0
  169.           {% endif %}
  170.  
  171.     net_usage:
  172.       friendly_name: Used Solar Energy
  173.       unit_of_measurement: kWh
  174.       value_template: "{{ ((states('sensor.pv_solaredge_energy_today')|float - states('sensor.daily_injection')|float)) | round(3) }}"
  175.  
  176.  
  177.     kwartierpiek_t1t2:
  178.       friendly_name: kwartierpiek
  179.       unit_of_measurement: kWh
  180.       value_template: "{{ (states('sensor.kwartierpiek_t1')|float + states('sensor.kwartierpiek_t2')|float) | round(3)}}"
  181.      
  182.     daily_energy:
  183.       friendly_name: Daily Energy
  184.       unit_of_measurement: kWh
  185.       value_template: "{{ (states('sensor.daily_energy_offpeak')|float + states('sensor.daily_energy_peak')|float) | round(3)}}"
  186.  
  187.     daily_injection:
  188.       friendly_name: Daily Injection
  189.       unit_of_measurement: kWh
  190.       value_template: "{{ (states('sensor.daily_injection_peak')|float + states('sensor.daily_injection_offpeak')|float) | round(3) }}"
  191.  
  192.  
  193.  
  194.     current_power_import:
  195.       friendly_name: Huidig afgenomen vermogen
  196.       unit_of_measurement: W
  197.       value_template: >-
  198.           {% if (states('sensor.p1_meter_active_power') | float > 0) %}
  199.             {{ states('sensor.p1_meter_active_power') }}
  200.           {% else %}
  201.             0
  202.           {% endif %}
  203.  
  204.     current_power_export:
  205.       friendly_name: Huidig teruggeleverd vermogen
  206.       unit_of_measurement: W
  207.       value_template: >-
  208.           {% if (states('sensor.p1_meter_active_power') | float < 0) %}
  209.             {{ states('sensor.p1_meter_active_power') }}
  210.           {% else %}
  211.             0
  212.           {% endif %}
  213.  
  214.     weekly_energy:
  215.       friendly_name: Weekly Energy
  216.       unit_of_measurement: kWh
  217.       value_template: "{{ (states('sensor.weekly_energy_offpeak')|float + states('sensor.weekly_energy_peak')|float) | round(3) }}"
  218.  
  219.     monthly_energy:
  220.       friendly_name: Monthly Energy
  221.       unit_of_measurement: kWh
  222.       value_template: "{{ (states('sensor.monthly_energy_offpeak')|float + states('sensor.monthly_energy_peak')|float) | round(3) }}"
  223.  
  224.     energy_import_total_dagelijks_kwh_2:
  225.       friendly_name: 'kWh vandaag dal + normaal'
  226.       value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float + states('sensor.energy_import_t2_dagelijks')|float)|round(2) }}"
  227.       unit_of_measurement: kWh
  228.  
  229.     energy_import_total_wekelijks_kwh:
  230.       friendly_name: 'kWh wekelijks dal + normaal'
  231.       value_template: "{{ (states('sensor.energy_import_t1_wekelijks')|float + states('sensor.energy_import_t2_wekelijks')|float)|round(2) }}"
  232.       unit_of_measurement: kWh
  233.  
  234.     energy_import_total_maandelijks_kwh:
  235.       friendly_name: 'kWh maandelijks dal + normaal'
  236.       value_template: "{{ (states('sensor.energy_import_t1_maandelijks')|float + states('sensor.energy_import_t2_maandelijks')|float)|round(2) }}"
  237.       unit_of_measurement: kWh
  238.  
  239. ############################################################3
  240.  
  241.     energy_export_t2_dagelijks_eur:
  242.         friendly_name: 'Opbrengsten vandaag nomaal tarief (T2)'
  243.         value_template: "{{ (states('sensor.energy_export_t2_dagelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
  244.         unit_of_measurement: "€"
  245.  
  246.     energy_export_t1_dagelijks_eur:
  247.         friendly_name: 'Opbrengsten vandaag dal tarief (T1)'
  248.         value_template: "{{ (states('sensor.energy_export_t1_dagelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
  249.         unit_of_measurement: "€"
  250.  
  251.     energy_export_total_dagelijks_eur:
  252.         friendly_name: 'Opbrengsten export vandaag dal + normaal'
  253.         value_template: "{{ (states('sensor.energy_export_t2_dagelijks_eur')|float + states('sensor.energy_export_t1_dagelijks_eur')|float)|round(2) }}"
  254.         unit_of_measurement: "€"
  255.  
  256.     energy_export_total_dagelijks_kwh:
  257.         friendly_name: 'kWh export vandaag dal + normaal'
  258.         value_template: "{{ (states('sensor.energy_export_t2_dagelijks_eur')|float + states('sensor.energy_export_t1_dagelijks_eur')|float)|round(2) }}"
  259.         unit_of_measurement: "kWh"
  260.          
  261. #import electra
  262.     energy_import_t2_dagelijks_eur:
  263.         friendly_name: 'Kosten import vandaag nomaal tarief (T2)'
  264.         value_template: "{{ (states('sensor.energy_import_t2_dagelijks')|float * states('input_number.t2_energy_cost')|float)|round(2) }}"
  265.         unit_of_measurement: "€"
  266.  
  267.     energy_import_t1_dagelijks_eur:
  268.         friendly_name: 'Kosten import vandaag dal tarief (T1)'
  269.         value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float * states('input_number.t1_energy_cost')|float)|round(2) }}"
  270.         unit_of_measurement: "€"
  271.  
  272.     energy_import_total_dagelijks_eur:
  273.         friendly_name: 'Kosten import vandaag dal + normaal'
  274.         value_template: "{{ (states('sensor.energy_import_t2_dagelijks_eur')|float + states('sensor.energy_import_t1_dagelijks_eur')|float)|round(2) }}"
  275.         unit_of_measurement: "€"
  276.  
  277.     energy_import_total_dagelijks_kwh:
  278.         friendly_name: 'kWh import vandaag dal + normaal'
  279.         value_template: "{{ (states('sensor.energy_import_t1_dagelijks')|float + states('sensor.energy_import_t2_dagelijks')|float)|round(2) }}"
  280.         unit_of_measurement: "kWh"
  281.  
  282. #Netto electra (kosten - opbrengsten) Bij teruggave zal er '-' zichtbaar zijn
  283.     energy_total_dagelijks_eur:
  284.         friendly_name: 'Kosten vandaag electra'
  285.         value_template: "{{ (states('sensor.energy_import_total_dagelijks_eur')|float - states('sensor.energy_export_total_dagelijks_eur')|float)|round(2) }}"
  286.         unit_of_measurement: "€"
  287.  
  288.  
  289. #import gas
  290.     energy_gass_eur:
  291.         friendly_name: 'Kosten vandaag gas'
  292.         value_template: "{{ (states('sensor.energy_gas_dagelijks')|float * states('input_number.gas_energy_cost')|float)|round(2) }}"
  293.         unit_of_measurement: "€"
  294.  
  295. #Totale netto kosten (Gas + electra)
  296.     energy_gas_en_elektriciteit_eur:
  297.         friendly_name: 'Totale netto kosten energie'
  298.         value_template: "{{ (states('sensor.energy_gass_eur')|float + states('sensor.energy_total_dagelijks_eur')|float)|round(2) }}"
  299.         unit_of_measurement: "€"
  300.  
  301.  
  302.  
  303. - platform: statistics
  304.   entity_id: sensor.kwartierpiek_t1t2
  305.   max_age:
  306.     days: 30
  307.  
  308.  
RAW Paste Data