core/homeassistant/components/bayesian
HarvsG 70ebf2f5d8
Accept more than 1 state for numeric entities in Bayesian (#119281)
* test driven delevopment

* test driven development - multi numeric state

* better multi-state processing

* when state==below return true

* adds test for a bad state

* improve codecov

* value error already handled in async_numeric_state

* remove whitespace

* remove async_get

* linting

* test_driven dev for error handling

* make tests fail correctly

* ensure tests fail correctly

* prevent bad numeric entries

* ensure no overlapping ranges

* fix tests, as error caught in validation

* remove redundant er call

* remove reddundant arg

* improves code coverage

* filter for numeric states before testing overlap

* adress code review

* skip non numeric configs but continue

* wait to avoid race condition

* Better tuples name and better guard clause

* better test description

* more accurate description

* Add comments to calculations

* using typing not collections as per ruff

* Apply suggestions from code review

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* follow on from suggestions

* Lazy evaluation

Co-authored-by: Erik Montnemery <erik@montnemery.com>

* update error text in tests

* fix broken tests

* move validation function call

* fixes return type of above_greater_than_below.

* improves codecov

* fixes validation

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-09-12 12:06:18 +02:00
..
__init__.py
binary_sensor.py Accept more than 1 state for numeric entities in Bayesian (#119281) 2024-09-12 12:06:18 +02:00
const.py Accept more than 1 state for numeric entities in Bayesian (#119281) 2024-09-12 12:06:18 +02:00
helpers.py Accept more than 1 state for numeric entities in Bayesian (#119281) 2024-09-12 12:06:18 +02:00
icons.json Update icons.json to new service schema part 1 (#124768) 2024-08-28 13:47:02 +02:00
issues.py
manifest.json
services.yaml
strings.json