Commit graph

12 commits

Author SHA1 Message Date
Erik Montnemery
5987266e56
Refactor template entity to allow reuse (#72753)
* Refactor template entity to allow reuse

* Fix schema and default name

* Add tests

* Update requirements

* Improve test

* Tweak TemplateSensor initializer

* Drop attributes and availability from TemplateEntity

* Use rest sensor for proof of concept

* Revert changes in SNMP sensor

* Don't set _attr_should_poll in mixin class

* Update requirements
2022-06-08 15:55:49 +02:00
Erik Montnemery
adde9130a1
Support this variable in template select actions (#71798) 2022-05-13 09:32:45 -07: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
e9a9b119c4
Teach TemplateEntity unique_id (#64837) 2022-01-24 23:16:31 +01:00
epenet
78e92d1662
Adjust pylint plugin to enforce platform type hints (#64836)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-24 18:51:06 +01:00
Erik Montnemery
321f54494e
Teach TemplateEntity entity name (#62175)
* Teach TemplateEntity entity name

* Remove default name from number and select config schemas

* Re-add default name to number and select config schemas

* Set name to None if name template fails to render

* Update template button
2022-01-24 15:44:05 +01:00
Erik Montnemery
597045149f
Minor refactor of template select (#62091) 2021-12-16 17:11:27 +01:00
Erik Montnemery
b42e2e6ef0
Fix typo in template select (#61919) 2021-12-15 20:10:42 +01:00
Erik Montnemery
3d909b00d5
Remove unneeded dynamic lookup of domain (#59423) 2021-11-09 07:41:45 -08:00
Jeff Irion
9dfb684002
Enable template icons for template selects (#57092)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2021-10-07 15:38:02 +02:00
Raman Gupta
37d75e8a03
Allow multiple template.select platform entries (#55908) 2021-09-07 14:50:07 -07:00
Raman Gupta
8407ad01d4
Add select platform to template integration (#54835) 2021-08-25 11:21:24 -07:00