Giter VIP home page Giter VIP logo

Comments (10)

fredrikbaberg avatar fredrikbaberg commented on July 24, 2024

I've done some experimentation based on ESPHome documentation and the dsmr repository. I'm still waiting for data to be visible in the Energy panel (can take up to 2 hours), but adding the following to Cumulative Active Import at least allows it to be added:

state_class: "measurement"
device_class: "energy"
last_reset_type: "never"

from esphome-p1reader.

Emlben avatar Emlben commented on July 24, 2024

I have the same issue.
Was told to add, in addition to device class and state, this :
last_reset; "1970-01-01T00:00:00+00:00"

Same state, can add the cumulative active import but no data is showing.

from esphome-p1reader.

fredrikbaberg avatar fredrikbaberg commented on July 24, 2024

I have the same issue.
Was told to add, in addition to device class and state, this :
last_reset; "1970-01-01T00:00:00+00:00"

Same state, can add the cumulative active import but no data is showing.

I read that last_reset_type: "never" should set last_reset to epoch, so it should lead to the same result. There is now a pull request that allows the sensor to be added.

from esphome-p1reader.

grobius avatar grobius commented on July 24, 2024

I must be doing something wrong. Keep getting this error regardless of how I format the yaml

  [state_class] is an invalid option for [0]. Did you mean [state_topic], [device_class]?
  state_class: measurement [source p1reader.yaml:74]
  device_class: energy

  [last_reset_type] is an invalid option for [0]. Please check the indentation.
  last_reset_type: never [source p1reader.yaml:76]

from esphome-p1reader.

fredrikbaberg avatar fredrikbaberg commented on July 24, 2024

@grobius have you formatted the lines in the same way as the pull request I've linked to this issue? It seems to complain about indentation.

from esphome-p1reader.

grobius avatar grobius commented on July 24, 2024

Yes, I did copy it from the pullrequest. I can't see that there is something wrong with it (but it's probably me):

  sensors:
  - name: "Cumulative Active Import"
    unit_of_measurement: kWh
    accuracy_decimals: 3
    state_class: "measurement"
    device_class: "energy"
    last_reset_type: "never"

from esphome-p1reader.

grobius avatar grobius commented on July 24, 2024

Solved it. Update of esphome was required (I was running v1.18, upgrade to v1.20.4 solved it)

from esphome-p1reader.

Emlben avatar Emlben commented on July 24, 2024

Yes, I did copy it from the pullrequest. I can't see that there is something wrong with it (but it's probably me):

Same error message here when pasting in ESPhome.

from esphome-p1reader.

Emlben avatar Emlben commented on July 24, 2024

Solved it. Update of esphome was required (I was running v1.18, upgrade to v1.20.4 solved it)

Dooh, same issue here ;)

Thanks mates!

from esphome-p1reader.

psvanstrom avatar psvanstrom commented on July 24, 2024

Fixed by @fredrikbaberg in PR #13 👍

from esphome-p1reader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.