Advertisement
314ma

configuration updated

Mar 22nd, 2023
685
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 4.53 KB | None | 0 0
  1. # Loads default set of integrations. Do not remove.
  2. default_config:
  3. homeassistant:
  4.   packages: !include_dir_merge_named packages/
  5. frontend:
  6.   themes: !include_dir_merge_named themes
  7.  
  8. # Text to speech
  9. tts:
  10.   - platform: google_translate
  11.  
  12. automation: !include automations.yaml
  13. script: !include scripts.yaml
  14. scene: !include scenes.yaml
  15.  
  16. ################### PONIŻEJ WYWALASZ ###################
  17. sensor:
  18.   - platform: rest
  19.     scan_interval: 10
  20.     name: Pvmt
  21.     resource: http://pvmterminal.local/public
  22.     value_template: "{{value_json.info.myip}}"
  23.     json_attributes:
  24.      - 18b20
  25.       - rs485
  26.       - info
  27.   - platform: template
  28.     sensors:
  29.       temperatura_cwu:
  30.         value_template: "{{ state_attr('sensor.pvmt','18b20')['ds18b20read'][0]['s_ds18b20v'] }}"
  31.         device_class: temperature
  32.         unit_of_measurement: "°C"
  33.       bateria:
  34.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][0]['em_Bat %'] }}"
  35.         device_class: battery
  36.         unit_of_measurement: "%"
  37.       napiecie_l1:
  38.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_V L1'] }}"
  39.         device_class: voltage
  40.         unit_of_measurement: "V"
  41.       napiecie_l2:
  42.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_V L2'] }}"
  43.         device_class: voltage
  44.         unit_of_measurement: "V"
  45.       napiecie_l3:
  46.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_V L3'] }}"
  47.         device_class: voltage
  48.         unit_of_measurement: "V"
  49.       prad_l1:
  50.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_I L1'] }}"
  51.         device_class: current
  52.         unit_of_measurement: "A"
  53.       prad_l2:
  54.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_I L2'] }}"
  55.         device_class: current
  56.         unit_of_measurement: "A"
  57.       prad_l3:
  58.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_I L3'] }}"
  59.         device_class: current
  60.         unit_of_measurement: "A"
  61.       produkcja_dzienna:
  62.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][0]['em_En day gen'] }}"
  63.         device_class: energy
  64.         unit_of_measurement: "kWh"
  65.       produkcja_calkowita:
  66.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][0]['em_En gen'] }}"
  67.         device_class: energy
  68.         unit_of_measurement: "kWh"
  69.       zuzycie:
  70.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_Imp kWh'] }}"
  71.         device_class: energy
  72.         unit_of_measurement: "kWh"
  73.       eksport:
  74.         value_template: "{{ state_attr('sensor.pvmt','rs485')['emetersread'][1]['em_Exp kWh'] }}"
  75.         device_class: energy
  76.         unit_of_measurement: "kWh"
  77.       pompa:
  78.         value_template: "{{ state_attr('sensor.pvmt','pulse')['empulseread'][0]['em_kWh'] }}"
  79.         device_class: energy
  80.         unit_of_measurement: "kWh"
  81.  
  82.       nr_seryjny:
  83.         value_template: "{{ state_attr('sensor.pvmt','info')['pvsno'] }}"
  84.       uruchomienie:
  85.         value_template: "{{ state_attr('sensor.pvmt','info')['pvstrt'] }}"
  86.       adres_ip:
  87.         value_template: "{{ state_attr('sensor.pvmt','info')['myip'] }}"
  88.  
  89. ################### POWYŻEJ WYWALASZ ###################
  90.  
  91.  
  92.   - platform: tauron_amiplus
  93.     name: Tauron AMIPlus
  94.     username:
  95.     password:
  96.     energy_meter_id: 590322429400825719
  97.     monitored_variables:
  98.      - consumption_reading
  99.       - consumption_daily
  100.       - consumption_monthly
  101.       - consumption_yearly
  102.       - consumption_last_12_months
  103.       - generation_reading
  104.       - generation_daily
  105.       - generation_monthly
  106.       - generation_yearly
  107.       - generation_last_12_months
  108.       - balanced_daily
  109.       - balanced_monthly
  110.       - balanced_last_12_months
  111.  
  112. input_number:
  113.   initial_energy_bank:
  114.     min: 0
  115.     max: 100000000
  116.     step: 1
  117.     mode: box
  118. template:
  119.   - sensor:
  120.       - name: Tauron energy bank
  121.         state_class: total
  122.         device_class: energy
  123.         unique_id: tauron energy_bank
  124.         icon: mdi:home-battery-outline
  125.         state: "{{ (states('input_number.initial_energy_bank') | float(0) + states('sensor.tauron_amiplus_generation_yearly') | float(0) * 0.8 - states('sensor.tauron_amiplus_consumption_yearly') | float(0)) | round(3) }}"
  126.         unit_of_measurement: "kWh"
  127.         availability: "{{ states('sensor.tauron_amiplus_generation_yearly') | is_number and states('sensor.tauron_amiplus_consumption_yearly') | is_number }}"
  128.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement