#masterdot- setting up solar with qcell hardware

1 messages ยท Page 1 of 1 (latest)

vague garnet
#

thread?

frigid gate
#

right

#

your sensor is called sensor.qcellsolar

#

earlier today in the template that's not the sensor name you had written

vague garnet
#

i did rename them and did assign a new uuid to be able to find them more easily

frigid gate
#

Ah OK

#

you have wrong device classes

#

kW is not energy

#

but not sure if your units is then wrong or those values are actually representing kW?

vague garnet
#

masterdot- setting up solar with qcell hardware

frigid gate
#

Ok

#

only problem now is I don't know what you have because the names you've put aren't in ENglish haha

#

for the template sensors ๐Ÿ˜…

vague garnet
#

aktuelle_leistung_solar - current power solar

#

energieverbrauch stromnetz - consumpition grid external

#

gesamt produktion - overall production

#

ladezustand akku - charging level battery

#

leistung akku - power battery

#

tages produktion - daily production solar

frigid gate
#

Might be easier if you could sent a pastebin with your templates

vague garnet
#

there you go ๐Ÿ™‚ did post it before, but no problem ๐Ÿ™‚

frigid gate
#

must have missed it sorry

#

So lets take your first template

#

you are extracting consumeenergy

#

if you look at the PDF you sent --> consumeenergy has a unit of KWh

#

not kW

#

also your availability templates I'm just noticing are also wrong

vague garnet
#

what is wrong with them?

frigid gate
#

an availability field needs a template that returns true or false

#

true = available
false = not available

#

in all of yours you are extracting a value and dividing by 1000

#

Another thing

#

ladezustand_akku and gesamt_produktion have the same template

#

OK let's forget the battery stuff for a bit

#
template:
  - sensor:
      - name: Energieverbrauch Stromnetz
        unique_id: b172c76e-bf94-4b4d-8a9d-070b42e3c7db
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        state: >-
          {{ state_attr('sensor.qcellsolar', 'consumeenergy') }}
        availability: "{{ state_attr('sensor.qcellsolar', 'consumeenergy') | is_number }}"

  - sensor:
      - name: Energy to Grid
        unique_id: 5394edd7-7628-4b07-8410-df5a77472b0d
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        state: >-
          {{ state_attr('sensor.qcellsolar', 'feedinenergy') }}
        availability: "{{ state_attr('sensor.qcellsolar', 'feedinenergy') | is_number }}"

      - name: Tages Produktion
        unique_id: dff3d7ab-7904-42d9-aefa-03e7da7b836a
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        state: >-
          {{ state_attr('sensor.qcellsolar', 'yieldtoday') }}
        availability: "{{ state_attr('sensor.qcellsolar', 'yieldtoday') | is_number}}"

      - name: Gesamt Produktion
        unique_id: cd82cafa-c93e-4af3-830c-f3fbd932b5b8
        unit_of_measurement: kWh
        device_class: energy
        state_class: total_increasing
        state: >-
          {{ state_attr('sensor.qcellsolar', 'yieldtotal') }}
        availability: "{{ state_attr('sensor.qcellsolar', 'yieldtotal') | is_number}}"
#

the name can also be multiple words

#

I added feedinenergy that was missing

#

These above are all your energy sensors --> kWh

vague garnet
#

fascinating... now they are showing up in the energy section..

#

ill take some time and have a look at it... this stuff is quite new and its a good point to learn ๐Ÿ™‚

#

thanks for your help, ill check back if i need a bit more assistence (or have it running)

frigid gate
#

๐Ÿ˜„

vague garnet
#

hmmm.... how do i create a entity to use for values?

vague garnet
#
  • name: Batterie Laden
    unique_id: 6222cab3-b693-42dc-add9-9fa75b22b1bb
    unit_of_measurement: W
    device_class: energy
    state_class: measurement
    state: >-
    {{ state_attr('sensor.qcellsolar', 'batPower') }}
    availability: "{{ state_attr('sensor.qcellsolar', 'batPower') | is_number }}"

    - name: Batterie Einspeisung
      unique_id: 2268f994-6c94-4a75-a2d8-e585aff0315d
      unit_of_measurement: W
      device_class: energy
      state_class: measurement
      state: >-
        {{ state_attr('sensor.qcellsolar', 'batPower') }}
      availability: "{{ state_attr('sensor.qcellsolar', 'batPower') | is_number }}"
    
#

how do i create a if else? the batPower is negative if the battery is giving energy and positive if its been loaded

#

my idea was to create two entitys, one for loading and one for discharging