Commit Graph

25 Commits

Author SHA1 Message Date
Petro31
9a25561017 Fix duplicate code from merge conflict (#143880)
fix conflict
2025-04-29 16:09:08 +02:00
Petro31
b2fcab20a6 Add trigger based entities to template switch (#141763)
* Add trigger based entities to template switch platform

* add suggestions
2025-04-29 09:40:16 +02:00
Petro31
469176c59b Fix trigger template entity issue when coordinator data is None (#143830)
Fix issue when coordinator data is None
2025-04-28 14:32:16 +02:00
Petro31
ff2c901930 Update trigger based template entity resolution order (#140660)
* Update trigger based template entity resolution order

* add test

* fix most comments

* Move resolution to base class

* add comment

* remove uncessary if statement

* add more tests

* update availability tests

* update logic stage 1

* phase 2 changes

* fix trigger template entity tests

* fix trigger template entities

* command line tests

* sql tests

* scrape test

* update doc string

* add rest tests

* update sql sensor _update signature

* fix scrape test constructor

* move state check to trigger_entity

* fix comments

* Update homeassistant/components/template/trigger_entity.py

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

* Update homeassistant/helpers/trigger_template_entity.py

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

* Update homeassistant/helpers/trigger_template_entity.py

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

* update command_line and rest

* update scrape

* update sql

* add case to command_line sensor

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2025-04-25 13:17:25 +02:00
Petro31
aec6868af1 Add abstract class to trigger based template entities (#139650)
* add abstract class to trigger based template entities

* updates after merge of parent PR

* add comments

* add tests
2025-03-06 08:00:11 +01:00
G Johansson
742eca5927 Use TemplateStateFromEntityId in Template trigger entity (#130136) 2024-11-08 22:09:43 +01:00
epenet
acebf1fb48 Adjust _ENTITY_COMPONENTS in hass-enforce-class-module (#126603) 2024-09-24 12:19:39 +02:00
Marc Mueller
062cc4bfce Add empty line after module docstring [t-v] (#112705) 2024-03-08 10:35:23 -05:00
Erik Montnemery
42046a3ce2 Fix TriggerEntity.async_added_to_hass (#100119) 2023-09-11 14:33:43 +02:00
G Johansson
61c17291fb Move TemplateEntity to template (#98957)
* Move TemplateEntity to template

* Rename template_entity in helpers
2023-08-24 15:37:04 +02:00
Erik Montnemery
3e71b1daa4 Correct calls to super class in TriggerEntity (#94916) 2023-06-20 23:00:22 +02:00
G Johansson
1fa82fa886 Move TriggerBaseEntity into helpers (#91945)
* Move TriggerBaseEntity

* mypy
2023-04-25 09:56:40 +02:00
G Johansson
afc9e4303a Create base TriggerEntity (#91128)
* Trigger entity base class

* mods

* TriggerEntity to CoordinatorTriggerEntity

* variables to variable

* mypy

* unique_id

* Fix

* docstring

* _render_templates

* split manual vs coordinator

* name

* ManualTriggerEntity

* value

* use super

* Remove ManualTriggerEntity

* Use super()
2023-04-17 19:55:54 +02:00
akloeckner
aa314a0901 Add this variable to trigger-based templates (#72437)
add this variables to trigger-based templates

follow-up for https://github.com/home-assistant/core/issues/70359
2022-06-27 08:59:29 +02:00
Erik Montnemery
7b5dd4a623 Restore attributes of template binary sensor (#69350) 2022-04-05 22:58:12 -07:00
Erik Montnemery
a95b4f6763 Correct unit_of_measurement for trigger-based template sensor (#69291) 2022-04-04 22:10:59 -07:00
Marc Mueller
830cc278d3 Improve CoordinatorEntity typing (#68441) 2022-03-21 10:22:30 +01:00
epenet
47d6f75c17 Enable basic type checking in template (#66222)
* Fix binary_sensor

* Adjust button

* Adjust fan

* Adjust select

* Adjust template_entity

* Adjust trigger_entity

* Adjust weather

* Adjust init

* Adjust number

* Adjust None check
2022-02-10 10:59:54 +01:00
Erik Montnemery
b13e4e9953 Small tweak of TriggerEntity typing (#59875) 2021-11-18 14:34:07 +01:00
Paulus Schoutsen
0c2772e0be Fix template sensor availability (#55635) 2021-09-03 09:02:45 +02:00
Raman Gupta
8407ad01d4 Add select platform to template integration (#54835) 2021-08-25 11:21:24 -07:00
Michael
9eecd90afc Add constructor return type in integrations T-Z (#50899) 2021-05-20 17:00:19 +02: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
e882460933 Support modern config for the trigger based template entity (#48635) 2021-04-02 16:57:16 -07:00
Paulus Schoutsen
022f56f54d Allow specifying template entities based on triggers (#48169)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-03-29 09:57:51 -07:00