Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional data #84

Open
Kotikoodari opened this issue Apr 1, 2023 · 4 comments
Open

Optional data #84

Kotikoodari opened this issue Apr 1, 2023 · 4 comments

Comments

@Kotikoodari
Copy link

Kotikoodari commented Apr 1, 2023

Thanks for the SEMS API!
I have just installed that and got it preliminary operational.

However, I wonder why it doesn't provide all the available data - such as daily energy production.
Current power and total Energy are provided.

I'm trying to follow instructions and add temperature and daily energy generation visible by adding "PV Temperature" and "PV energy day".
However, the instructions are not very clear for a new HA guy like me and I hope to get very clear instructions how to get the data available.

Instruction tells:

Extra (optional) templates to easy access data as sensors
Replace $NAME with your inverter entity id.

I have created a sensors.yaml file (in the same folder as configurations.yaml) with below text (with correct id):

- platform: template
  sensors:
    pv_temperature:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.tempperature }}'
        unit_of_measurement: 'C'
        friendly_name: "PV Temperature"
    pv_eday:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.eday }}'
        unit_of_measurement: 'kWh'
        friendly_name: "PV energy day"
    pv_etotal:
        value_template: '{{ states.sensor.inverter_$NAME.attributes.etotal }}'
        unit_of_measurement: 'kWh'
        friendly_name: "PV energy total"

And I have written a row in the configurations.yaml:

sensor: !include sensors.yaml

However, I cannot get this working...

When trying to add a sensor "PV energy day" it says that it is not in use and it doesn't provide value.

Can someone help to provide clear instructions... I'm not too familiar yet with the logic of the yaml files and templates...

Also in future it might be good to provide all the basic values available by default, especially today's energy production.

Thank you!

@sixtybi
Copy link

sixtybi commented Jul 26, 2023

Hi, have you figured this out already? I just faced the same issues here. Not very clear how to fetch more data. I only have current power and generated total.
Please let me know how to proceed with this. Thanks!

@TimSoethout
Copy link
Owner

It seems the template syntax has changed, see https://www.home-assistant.io/integrations/template . Although the old syntax does still work for now.

It should become something like this (untested):

template:
  - sensor:
      - name: "PV energy day"
        unit_of_measurement: "kWh"
        state: '{{ states.sensor.inverter_$NAME.attributes.eday }}'

I agree that in the future these values should be added as separate sensors.

@patrickmoll83
Copy link

patrickmoll83 commented Aug 2, 2023

I have the same issue, can someone help me?

@f00f
Copy link

f00f commented Oct 31, 2023

For me, this worked:

template:
  unique_id: pv_gw10k_et
  sensor:
    - name: "PV Energy day"
      unique_id: pv_gw10k_et.pv_energy_day
      device_class: energy
      state: '{{ states.sensor.inverter_gw10k_et.attributes.eday }}'
      state_class: total
      unit_of_measurement: kWh
    - name: "Battery SoC"
      unique_id: pv_gw10k_et.pv_soc
      state: '{{ states.sensor.inverter_gw10k_et.attributes.soc }}'
      state_class: measurement
      unit_of_measurement: '%'
      icon: mdi:battery-20
    - name: "Battery SoH"
      unique_id: pv_gw10k_et.pv_soh
      state: '{{ states.sensor.inverter_gw10k_et.attributes.soh }}'
      state_class: measurement
      unit_of_measurement: '%'
      icon: mdi:battery-check-outline

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants