hass-core/tests/components/template
J. Nick Koston b574220247
Refactor rate limit helper to track time in seconds (#113898)
* Refactor rate limit helper to track time in seconds

Currently we created datetime and timedelta objects to enforce the
rate limit. When the rate limit was being hit hard, this got expensive.

We now use floats everywhere instead as they are much cheaper which
is important when we are running up against a rate limit, which is
by definition a hot path

The rate limit helper is currently only used for templates and
we do not have any code in the code base that directly passes
in a rate limit so the impact to custom components is expected
to be negligible if any

* misesd two
2024-03-20 19:49:37 -04:00
..
fixtures
snapshots Add State.last_reported (#113511) 2024-03-20 21:05:07 +01:00
__init__.py
conftest.py
test_alarm_control_panel.py
test_binary_sensor.py
test_button.py
test_config_flow.py Enable Ruff rule PT007 (#113764) 2024-03-19 09:01:07 +01:00
test_cover.py
test_fan.py Add first batch of Ruff PT rules (#113665) 2024-03-18 13:26:14 +01:00
test_image.py
test_init.py Refactor rate limit helper to track time in seconds (#113898) 2024-03-20 19:49:37 -04:00
test_light.py
test_lock.py
test_manual_trigger_entity.py
test_number.py
test_select.py
test_sensor.py Refactor rate limit helper to track time in seconds (#113898) 2024-03-20 19:49:37 -04:00
test_switch.py
test_template_entity.py
test_trigger.py
test_vacuum.py
test_weather.py Run service call tasks eagerly (#112791) 2024-03-08 20:37:21 -10:00