39 Commits

Author SHA1 Message Date
Petro31 ee8c3ca864 Fix swallowed exceptions in template action handlers (#171080) 2026-05-18 13:55:59 +02:00
Franck Nijhof 833ff982d0 Fix line length violations in tests/components t-z (#170994) 2026-05-17 17:12:29 -04:00
Petro31 ab668ac576 Remove legacy sensor template entities (#169728) 2026-05-07 15:22:22 +02:00
Ariel Ebersberger 1fc0b620c0 Fix flaky template test (#169361) 2026-04-28 14:09:07 +02:00
Petro31 c7417d77b5 Update template select test framework (#161389) 2026-01-21 22:31:00 +01:00
Erik Montnemery e009898107 Remove template config entry from source device (#157814)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2025-12-03 15:24:48 +01:00
Petro31 3073a99ce6 Reload config entry templates when labs flag automation.new_triggers_conditions is set (#157637)
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-12-01 19:27:30 +01:00
Petro31 010aea952c Reload templates when labs flag automation.new_triggers_conditions is set (#157368) 2025-11-27 18:05:33 +01:00
Petro31 405a9948a2 Deprecate legacy and undocumented template entity configurations (#155355) 2025-11-26 14:30:06 +01:00
Petro31 58d4fd0b75 Add update platform to template integration (#150277) 2025-08-25 14:43:23 +02:00
Petro31 8fbf6dbd0b Add event platform to templates (#145408)
Co-authored-by: Norbert Rittel <norbert@rittel.de>
2025-08-25 07:50:22 +02:00
Erik Montnemery 381bd489d8 Do not add template config entry to source device (#148756) 2025-07-15 22:13:03 +02:00
epenet 5fb9537d6d Use pytest.mark.usefixtures for start_ha in template tests (#126805) 2024-09-26 14:00:52 +02:00
Erik Montnemery cf049a07c2 Don't allow templating min, max, step in config entry template number (#125342) 2024-09-06 07:59:22 +02:00
Joost Lekkerkerker 8c2e63807c Make set_value required in number template (#124917)
* Make set_value required in number template

* Make set_value required in number template

* Fix tests
2024-08-30 22:02:10 +02:00
epenet 3dc83ef19d Add missing hass type hint in component tests (t) (#124274) 2024-08-20 12:55:39 +02:00
dougiteixeira f581066747 Add config flow for platform number in Template (#121849)
* Add config flow to select platform in Template

* Remove device id duplicate in schema

* Add config flow for number platform in Template

* Remove mode
2024-08-15 20:02:51 +02:00
Marc Mueller a6068dcdf2 Update import locations in tests (#122216) 2024-07-20 11:16:04 +02:00
dougiteixeira 162b734be7 Add config flow for select platform in Template (#121809) 2024-07-12 17:50:02 +02:00
dougiteixeira 52454f5218 Add config flow for platform switch in Template (#121639) 2024-07-11 10:11:31 +02:00
dougiteixeira e0c7073da1 Add config flow for image platform in Template (#121648) 2024-07-10 23:49:24 +02:00
dougiteixeira d783813ba0 Add config flow for platform button in Template (#120886) 2024-07-09 21:20:18 +02:00
dougiteixeira 4289efb506 Device change test improvements in Template (#120884) 2024-07-05 14:47:31 +02:00
dougiteixeira 10edf85311 Update test_device_cleaning in Template (#120163) 2024-06-22 15:59:46 +02:00
dougiteixeira 6e32a96ff3 Add the ability to bind the template helper entity to a device (#117753) 2024-06-22 12:45:06 +02:00
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
Marc Mueller 87165c0d6e Add empty line after module docstring [tests t-z] (#112712) 2024-03-08 14:44:56 +01:00
epenet 88cfbf6a34 Add type hints to integration tests (part 22) (#88234) 2023-02-16 14:08:03 +01:00
Franck Nijhof ed79265843 Enable Ruff PT006 (#88165)
* Enable Ruff PT006

* Adjust existing cases

* Fix tests

* Remove unneeded parentheses
2023-02-15 14:09:50 +01:00
Paulus Schoutsen 31153ac155 Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Paulus Schoutsen a4d9019ffc Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
jan iversen c4195c547c Update template/test_init.py to use pytest (#56336) 2021-09-17 15:13:17 -07:00
Paulus Schoutsen 1016d4ea28 Support trigger-based template binary sensors (#49504)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-04-22 14:54:28 -07:00
Paulus Schoutsen 65126cec3e Allow top level non-trigger template entities (#48976) 2021-04-12 17:15:50 -07:00
Paulus Schoutsen 09635678bc Allow reloading top-level template entities (#48733) 2021-04-06 12:10:39 -07:00
Paulus Schoutsen 3dec394cad Migrate template to register reload service on async_setup (#48273) 2021-03-23 20:35:15 -07:00
J. Nick Koston b1ba1a7134 Verify template sensors that reference other template sensors can reload (#41031) 2020-10-02 08:34:33 +02:00
Franck Nijhof 1c2ebdf307 Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
J. Nick Koston 83b9c6188d Make template entities reloadable (#39075)
* Make template entities reloadable

* Address review items
2020-08-21 18:31:48 -05:00