Skip to content

Riemann sum goes negative #29234

@d3zit

Description

@d3zit

Feedback

It's been largely discusses, but it keeps happening.
image

        - name: "input_power_with_efficiency_loss"
          unique_id: "input_power_with_efficiency_loss"
          unit_of_measurement: "W"
          device_class: power
          state_class: measurement
          availability: >
            {{ states('sensor.inverter_input_power') | is_number }}
          state: >-
            {% set inverter_rating = 6000 %} {# adjust this value to the rated power of your inverter #}
            {% set inpower = states('sensor.inverter_input_power') | float %}
            {% if inpower < inverter_rating * 0.1 %}
              {{ inpower * 0.90 }}
            {% elif inpower < inverter_rating * 0.2 %}  
              {{ inpower * 0.95 }}
            {% else %}
              {{ inpower * 0.98 }}
            {% endif %}`

- platform: integration
  source: sensor.input_power_with_efficiency_loss
  name: solar_energy_riemann_k
  unit_prefix: k
  round: 3

URL

https://www.home-assistant.io/integrations/integration/

Version

2023.10.1

Additional information

No response

Metadata

Metadata

Assignees

Labels

integration: integrationstaleThe PR had no activity for quite some time, and is marked as Stale

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions