homeassistant - goodwe a mereni po fazich

Odpovědět
tomasi02
Příspěvky: 84
Registrován: ned říj 09, 2022 8:25 pm

homeassistant - goodwe a mereni po fazich

Příspěvek od tomasi02 »

Ahoj,
mate nekdo hotovy mereni ve fazich v home assistantu, abych nevymyslel kolo?
tj. na bazi sensors: Meter Active Power L1, L2, L3?
muzete se podelit o reseni?

ideu mam takovou, ze vytvorim 6 helperu pro scitani...Nebo nejaky lepsi zpusob?
danidani
Příspěvky: 305
Registrován: úte led 18, 2022 10:17 pm
Bydliště: Cerhovice
Výkon panelů v FVE [Wp]: 11400
Kapacita baterie [kWh]: 10

Re: homeassistant - goodwe a mereni po fazich

Příspěvek od danidani »

A zajímá tě to opravdu po fázích, nebo ti jde jen o oddělení odběr z DS vs. dodávka do DS?

edit: použil bych to takto

Kód: Vybrat vše

- platform: template
  sensors:
    power_buy:
      friendly_name: "Power Buy"
      device_class: power
      unit_of_measurement: 'W'
      value_template: >-
        {% set l1 = states('sensor.meter_active_power_l1')|float(default = 0) %}
        {% set l2 = states('sensor.meter_active_power_l2')|float(default = 0) %}
        {% set l3 = states('sensor.meter_active_power_l3')|float(default = 0) %}
        {{ '%i'|format( iif(l1 < 0, 0, l1) + iif(l2 < 0, 0, l2) + iif(l3 < 0, 0, l3) ) }}

    power_sell:
      friendly_name: "Power Sell"
      device_class: power
      unit_of_measurement: 'W'
      value_template: >-
        {% set l1 = states('sensor.meter_active_power_l1')|float(default = 0) %}
        {% set l2 = states('sensor.meter_active_power_l2')|float(default = 0) %}
        {% set l3 = states('sensor.meter_active_power_l3')|float(default = 0) %}
        {{ '%i'|format( -1 * (iif(l1 > 0, 0, l1) + iif(l2 > 0, 0, l2) + iif(l3 > 0, 0, l3)) ) }}
tomasi02
Příspěvky: 84
Registrován: ned říj 09, 2022 8:25 pm

Re: homeassistant - goodwe a mereni po fazich

Příspěvek od tomasi02 »

to scitani po fazich se mi hodi do "custom:power-flow-card-plus"

ale spatne jsem napsal dotaz.
jeste jsem chtel sumu za den z techto hodnot .. tj. v kWh.. (import/export kWh za den)

edit
sumu jsem tedy vytvoiril pres ty helpery

total_buy
sensor.total_buy
Integration - Riemann sum integral sensor
total_sell
sensor.total_sell
Integration - Riemann sum integral sensor
Přílohy
power_sell.png
power_sell.png (15.66 KiB) Zobrazeno 2294 x
danidani
Příspěvky: 305
Registrován: úte led 18, 2022 10:17 pm
Bydliště: Cerhovice
Výkon panelů v FVE [Wp]: 11400
Kapacita baterie [kWh]: 10

Re: homeassistant - goodwe a mereni po fazich

Příspěvek od danidani »

Kód: Vybrat vše


# Sensor for Riemann sum of buy energy consumption (W -> Wh)
- platform: integration
  name: total_energy_buy
  source: sensor.power_buy
  unit_prefix: k
  round: 1
  method: left
# Sensor for Riemann sum of sell energy consumption (W -> Wh)
- platform: integration
  name: total_energy_sell
  source: sensor.power_sell
  unit_prefix: k
  round: 1
  method: left
  
energy_buy_daily:
  source: sensor.total_energy_buy
  cycle: daily
energy_buy_monthly:
  source: sensor.total_energy_buy
  cycle: monthly
energy_buy_yearly:
  source: sensor.total_energy_buy
  cycle: yearly
energy_sell_daily:
  source: sensor.total_energy_sell
  cycle: daily
energy_sell_monthly:
  source: sensor.total_energy_sell
  cycle: monthly
energy_sell_yearly:
  source: sensor.total_energy_sell
  cycle: yearly

tomasi02
Příspěvky: 84
Registrován: ned říj 09, 2022 8:25 pm

Re: homeassistant - goodwe a mereni po fazich

Příspěvek od tomasi02 »

tak nevim, delam neco spatne.....
co tam mam blbe?
Invalid config for [sensor.template]: [source] is an invalid option for [sensor.template]. Check: sensor.template->sensors->energy_buy_daily->source. (See ?, line ?).

/config/configuration.yaml

Kód: Vybrat vše


# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
  themes: !include_dir_merge_named themes

# Text to speech
#tts:
#  - platform: google_translate



automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


# Example configuration entry

sensor:

  - platform: integration
    name: total_energy_buy
    source: sensor.power_buy
    unit_prefix: k
    round: 1
    method: left

  - platform: integration
    name: total_energy_sell
    source: sensor.power_sell
    unit_prefix: k
    round: 1
    method: left

  - platform: template
    sensors:

        power_buy:
          friendly_name: "Power Buy"
          device_class: power
          unit_of_measurement: 'W'
          value_template: >-
            {% set l1 = states('sensor.meter_active_power_l1')|float(default = 0) %}
            {% set l2 = states('sensor.meter_active_power_l2')|float(default = 0) %}
            {% set l3 = states('sensor.meter_active_power_l3')|float(default = 0) %}
            {{ '%i'|format( iif(l1 < 0, 0, l1) + iif(l2 < 0, 0, l2) + iif(l3 < 0, 0, l3) ) }}
    
        power_sell:
          friendly_name: "Power Sell"
          device_class: power
          unit_of_measurement: 'W'
          value_template: >-
            {% set l1 = states('sensor.meter_active_power_l1')|float(default = 0) %}
            {% set l2 = states('sensor.meter_active_power_l2')|float(default = 0) %}
            {% set l3 = states('sensor.meter_active_power_l3')|float(default = 0) %}
            {{ '%i'|format( -1 * (iif(l1 > 0, 0, l1) + iif(l2 > 0, 0, l2) + iif(l3 > 0, 0, l3)) ) }}
            
        energy_buy_daily:
            source: sensor.total_energy_buy
            cycle: daily
        energy_buy_monthly:
            source: sensor.total_energy_buy
            cycle: monthly
        energy_buy_yearly:
            source: sensor.total_energy_buy
            cycle: yearly
        energy_sell_daily:
            source: sensor.total_energy_sell
            cycle: daily
        energy_sell_monthly:
            source: sensor.total_energy_sell
            cycle: monthly
        energy_sell_yearly:
            source: sensor.total_energy_sell
            cycle: yearly
danidani
Příspěvky: 305
Registrován: úte led 18, 2022 10:17 pm
Bydliště: Cerhovice
Výkon panelů v FVE [Wp]: 11400
Kapacita baterie [kWh]: 10

Re: homeassistant - goodwe a mereni po fazich

Příspěvek od danidani »

Nejmenují se ty senzory u tebe jinak?

Kód: Vybrat vše

sensor.meter_active_power_l1
sensor.meter_active_power_l2
sensor.meter_active_power_l3
Tohle ti funguje?

2023-05-02_8-15-32.png
2023-05-02_8-15-32.png (109.34 KiB) Zobrazeno 2021 x
lipown
Příspěvky: 2
Registrován: čtv říj 05, 2023 3:35 pm

Re: homeassistant - goodwe a mereni po fazich

Příspěvek od lipown »

Jestli to dobře chápu tak tento součet by měl ukazovat cca skutečný odběr nebo výkup tzn. být blíže k hodnotám elektroměru než sensor total energy import/export přímo ze střídače kvůli "problému" s asymetrií? Je to tak prosím?
danidani
Příspěvky: 305
Registrován: úte led 18, 2022 10:17 pm
Bydliště: Cerhovice
Výkon panelů v FVE [Wp]: 11400
Kapacita baterie [kWh]: 10

Re: homeassistant - goodwe a mereni po fazich

Příspěvek od danidani »

Ano, je to tak.
Odpovědět

Zpět na „Home Assistant“