Andrey "Limych" Khrolenok

Results 67 comments of Andrey "Limych" Khrolenok

Interesting idea. I'll try to add that ability.

I tried to implement your idea, but there were difficulties: at the time of sensor initialization, it creates a task to track changes in the states of all source sensors....

I could not repeat your bug: everything works correctly with your config. Tested on the latest version of HA. ![Screenshot2](https://user-images.githubusercontent.com/8019701/174486574-17c1ca12-07ec-4468-8b2b-08f498ee9775.png) Please check that your source sensors are working correctly. Perhaps,...

Such calculations require a double pass of the algorithm over all source data. And this can very negatively affect the work of HA. I will try to come up with...

#9: > The calculation of the median requires storing in memory all variants of the values. And this can very negatively affect the work of HA.

@jere19, Alas, calculating the median is more difficult than simply change the logic of line 491. Look at the description of the median calculation logic in Wikipedia: https://en.wikipedia.org/wiki/Median#Finite_data_set_of_numbers

Considering that this component does not work with datasets, but in fact with areas of geometric shapes, it would be more correct to calculate medians using algorithms for such cases....

You end up with the wrong median. The `values` ​​array stores not the original, but the normalized sensor values. However, thanks, you gave me an idea how to implement the...

Beta version of median calculation: https://github.com/Limych/ha-average/tree/feature/median Have a nice day! :)

![2021-01-13_14-59-11](https://user-images.githubusercontent.com/8019701/104449740-1df2f980-55b0-11eb-8016-04422ddd3e59.png) I’m thinking, is it worth making the median value smoother? Now it is calculated by choosing the closest value from the data set, which is not entirely correct. It...