Coder Social home page Coder Social logo

Comments (3)

wminno avatar wminno commented on June 18, 2024

Actually, I worked around this by creating a combined power sensor in the configuration.yaml that takes the net power usage from both sensors on the phases and combines them into a single one:

template:

  • sensor:

    • name: "Stroomverbruik netto L1"
      unique_id: "stroom_netto_l1"
      unit_of_measurement: "W"
      state: >
      {{ states ('sensor.phases_power_consumed_phase_l1') | float(0) | round(0)
      - states ('sensor.phases_power_produced_phase_l1') | float(0) | round(0) }}
  • sensor:

    • name: "Stroomverbruik netto L2"
      unique_id: "stroom_netto_l2"
      unit_of_measurement: "W"
      state: >
      {{ states ('sensor.phases_power_consumed_phase_l2') | float(0) | round(0)
      - states ('sensor.phases_power_produced_phase_l2') | float(0) | round(0) }}
  • sensor:

    • name: "Stroomverbruik netto L3"
      unique_id: "stroom_netto_l3"
      unit_of_measurement: "W"
      state: >
      {{ states ('sensor.phases_power_consumed_phase_l3') | float(0) | round(0)
      - states ('sensor.phases_power_produced_phase_l3') | float(0) | round(0) }}

from ha-energy-overview-card.

Sese-Schneider avatar Sese-Schneider commented on June 18, 2024

I'm not sure if I should change the implementation of my card here.
I'd rather have Template Support, so you don't have to create template sensors, but do it inline.

What do you think about that?

from ha-energy-overview-card.

wminno avatar wminno commented on June 18, 2024

Having that in the card would be definitely nice. But if it's a major development hurdle like you mentioned, is it -really- worth it. Given you can quite easily do it with template sensors (took me 30 mins of fiddling to get it working). And if you need to do some corner cases, like me adding in-house real time usage based on PV delivery and power meter values, I may fall back to template sensors in the end after all..

Do love this card, thanks for it :)

from ha-energy-overview-card.

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.