core/homeassistant/components/derivative
Antony Kurniawan 156a88a3a3
Ignore negative derivative when the input is total_increasing (#119141)
* if the derivative is negative, ignore it

* add option to ignore the negatives or not

* add tests for a new ignore negative derivative

* add missing description when editing

* rename to ignore_negative_derivative
to increase clarity of which negative I mean
in case in the future we want a ignore_negative_value...

* use state_class=total_increasing to ignore the negative derivative

* remove ignore negative from the config

* add test for total_increasing_reset case

* add comments

* update test_total_increasing_reset with history tests
Also remove the last comment because the test is already clear
My existing comment there isn't unique to this unit test but applies to the entire component. The existing web documentation pointing to Wikipedia should suffice.

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-16 10:49:15 +02:00
..
__init__.py
config_flow.py
const.py
icons.json
manifest.json
sensor.py Ignore negative derivative when the input is total_increasing (#119141) 2024-09-16 10:49:15 +02:00
strings.json