* Update hpilo version in requirements_all.txt (#109581)
The issue with the deprecated and now removed ssl.wrap_socket function was fixed years ago in the library
* Update hpilo version in manifest.json (#109581)
Avoid linear search to remove from entity registry index
Because the entity registry index needs to preserve insertion order
for backwards compat, a list was used for the index. Because some
config entries/devices/areas have a large amount of entities, removing
the entities, the O(n) time complexity of removing from a list can
slow down reloads. As python has no orderedset in stdlib, use
a dict since it preserves insertion order has O(1) add/remove
time complexity for the average case
* Refactor keyed event trackers to avoid refactoring risk
Follow to https://github.com/home-assistant/core/pull/110978#discussion_r1496771106
I had to do some type ignores because of the EventType vs Event
which is hopefully not going to be needed after the next mypy
* delete constants only used one in other const
* no field
* fixes
* less refactoring later
* less refactoring later
* keep const
* Make adding entities in storage collection a normal function
Nothing is awaited when adding
* cleanup
* cleanup
* cleanup
* cleanup
* reduce
* reduce
* reduce
* reduce
* tweak
These functions created tasks to run small validators, and the cost of
creating all the tasks was more expensive than running the validators
themselves. Since the code is unlikely to suspend its more efficient to
await them in series.
* YAML loader performance improvements
- Cache the name of the loader since we call it multiple
times for every line
- Add a fast path for scalar tags since they are the
most common
* Update homeassistant/util/yaml/loader.py
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* remove unreachable code
---------
Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
* Add counter entities to the ZHA coordinator device
* rework to prepare for non coordinator device counters
* counter entity test
* update log lines
* disable by default
panel_custom never suspends so we can avoid the overhead of
creating and scheduling tasks
e398accc3e/homeassistant/components/panel_custom/__init__.py (L74)
panel_custom.async_register_panel could be converted to a normal function but it
would be a breaking change
* Bump library
* Update code to the new library version
* Improve diagnostics
* Fix tests
---------
Co-authored-by: Maciej Bieniek <478555+bieniu@users.noreply.github.com>
* add HeatingProgram type
* use HeatingProgram type
* add heatpump number sensors
* use HeatingProgram type
* Update strings.json
* rename HeatingProgram to Program
* remove commented code
* rename heating program type
* simplify
* Apply suggestions from code review
* Update strings.json
* Update const.py
* fix
* add heating program type
* correct imports
* Revert "fix"
This reverts commit 857dda59da.
* Apply suggestions from code review
* Update strings.json