Commit graph

376 commits

Author SHA1 Message Date
Paul Bottein
c306ebed49
Fix device id support for alarm control panel template (#127340) 2024-10-02 19:04:36 +02:00
epenet
45f92dd981
Improve type hints in template (#126802) 2024-09-26 15:05:46 +02:00
Martin Hjelmare
d5ad35630f
Fix missing template alarm control panel menu string (#126791) 2024-09-26 07:37:49 +02:00
G Johansson
93aade6e8e
Change lock state to an enum (#126379)
* Add new LockState enum for lock states

* Add rest

* Fix insteon tests

* Fix mqtt tests

* Fix tesla_fleet

* Revert back ST_STATE_LOCKED

* Add back constant
2024-09-24 12:30:50 +02:00
epenet
acebf1fb48
Adjust _ENTITY_COMPONENTS in hass-enforce-class-module (#126603) 2024-09-24 12:19:39 +02:00
G Johansson
86d8ddd289
Remove deprecated forecast key from template weather (#126132)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-23 18:57:32 +02:00
epenet
6bc2d11c5e
Add base Entity class to enforce-class-module pylint plugin (#126026)
* Add base Entity class to enforcé-class-module pylint plugin

* Ignore bluetooth

* Ignore hue

* Ignore dominos

* Ignore ffmpeg

* Ignore mqtt

* Ignore microsoft_face

* Ignore plant

* Ignore point

* Ignore rfxtrx

* Ignore template

* Ignore tag

* Ignore deconz
2024-09-18 20:38:45 +02:00
G Johansson
2080b9a87c
Add config flow to template alarm_control_panel (#125861)
* Add config flow to template alarm_control_panel

* Remove commented code

* Test import
2024-09-13 22:12:16 +02:00
G Johansson
d855f70e3b
Add RestoreEntity to template alarm_control_panel (#125844) 2024-09-13 16:44:48 +02:00
chammp
b3377fe5fb
Add condition to trigger template entities (#119689)
* Add conditions to trigger template entities

* Add tests

* Fix ruff error

* Ruff

* Apply suggestions from code review

* Deduplicate

* Tweak name used in debug message

* Add and improve type annotations of modified code

* Adjust typing

* Adjust typing

* Add typing and remove unused parameter

* Adjust typing

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Adjust return type

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-09-11 09:36:49 +02:00
chammp
56dfb2c734
Add unit_of_measurement to template numbers (#122862) 2024-09-11 08:47:17 +02:00
Erik Montnemery
dee4b33c64
Sort and remove duplicates from template/const.py (#125591) 2024-09-09 15:11:18 +02:00
dougiteixeira
926ffe536c
Fix UI config validation for button and switch actions in Template (#121810)
Fix IU config validation for button and switch actions in Template
2024-09-08 13:59:54 +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
Erik Montnemery
38ef216894
Update icons.json to new service schema part 4 (#124771) 2024-08-28 13:48:13 +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
Erik Montnemery
dc462aa529
Remove unnecessary assignment of Template.hass from template (#123773) 2024-08-13 11:54:36 +02:00
epenet
0bb8c4832d
Enable raise-within-try (TRY301) rule in ruff (#123351) 2024-08-12 09:16:33 +02:00
dougiteixeira
de5b5f6d36
Add string for value template description in switch Template (#121865)
Add string for value template descrition in switch Template
2024-07-19 13:58:22 +02:00
G Johansson
ca4c617d4b
Add TURN_OFF/TURN_ON feature flags for fan (#121447) 2024-07-19 11:35:24 +02:00
dougiteixeira
162b734be7
Add config flow for select platform in Template (#121809) 2024-07-12 17:50:02 +02:00
Dave T
62b9b34561
Fix typo in Template switch (#121856) 2024-07-12 16:03:24 +02:00
G Johansson
1acbcf921a
Fix schema and strings in template switch (#121843) 2024-07-12 15:50:21 +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
cf4bd7fd1c
Refactor schema generation in Template integration (#120889)
Co-authored-by: Robert Resch <robert@resch.dev>
2024-07-08 09:06:15 +02:00
dougiteixeira
0d48d5a5ec
Remove device ID from config schema via YAML in helper template (#120708) 2024-07-07 16:40:02 +02:00
dougiteixeira
295cfd26aa
Add missing translations for device class in Template (#120893) 2024-07-01 07:55:13 +02:00
epenet
f4fa5b581e
Import PLATFORM_SCHEMA from platform not from helpers (#120565) 2024-06-26 15:43:48 +02:00
epenet
912136be25
Force alias when importing lock PLATFORM_SCHEMA (#120531) 2024-06-26 11:52:57 +02:00
epenet
2c17d84fab
Force alias when importing cover PLATFORM_SCHEMA (#120522) 2024-06-26 11:25:14 +02:00
epenet
399130bc95
Force alias when importing binary sensor PLATFORM_SCHEMA (#120510) 2024-06-26 10:54:19 +02:00
epenet
c96dc00a3a
Force alias when importing alarm control panel PLATFORM_SCHEMA (#120505) 2024-06-26 10:41:46 +02:00
epenet
9b8922a678
Force alias when importing switch PLATFORM_SCHEMA (#120504) 2024-06-26 10:36:54 +02:00
Marc Mueller
3559755aed
Add import aliases for PLATFORM_SCHEMA (#120445) 2024-06-25 19:16:19 +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
chammp
52379ad7cb
Add code_format_template to template locks (#106947)
* Add code_format to template locks

* Replace code_format with code_format_template

* Add test case for template eval to None

* Apply suggestion to not call super()

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

* Add more negative tests

* Handle template render errors

* Better error message

* Add custom test lock config for code format

* Add type hints from upstream

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Franck Nijhof <git@frenck.dev>
2024-06-10 16:54:17 +02:00
epenet
960d1289ef
Avoid references to websocket_api.const in core and other components (#119285) 2024-06-10 13:49:44 +02:00
Marc Mueller
dd22ee3dac
Improve annotation styling (#118032) 2024-05-24 15:05:53 +02:00
Sid
ac54cdcdb4
Enable Ruff RUF010 (#115371)
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-05-08 23:54:49 +02:00
Sid
2cc916db6d
Replace pylint broad-except with Ruff BLE001 (#116250) 2024-05-07 14:00:27 +02:00
Sid
b456d97e65
Replace pylint protected-access with Ruff SLF001 (#115735) 2024-05-06 20:33:26 +02:00
J. Nick Koston
ca5ed274cb
Deprecate calling async_listen and async_listen_once with run_immediately (#115169) 2024-04-08 10:07:54 -10:00
Sid
0d66d298ec
Enable Ruff RET504 (#114528)
* Enable Ruff RET504

* fix test

* Use noqa instead of cast

* fix sonos RET504

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2024-04-06 11:07:37 +02:00
Marc Mueller
0f03079065
Update import for EventStateChangedData [i-z] (#114900) 2024-04-04 11:48:29 -10:00
Marc Mueller
816ce116bf
Remove unnecessary functools.cached_property backport (#114239) 2024-04-04 11:24:26 +02:00
J. Nick Koston
1462c99bc0
Load template platforms with eager_start (#114701)
* Load template platforms with eager_start

These can all be loaded synchronously

* missed some
2024-04-04 09:33:10 +02:00
G Johansson
65230908c6
Remove deprecated forecast attribute from WeatherEntity (#110761)
* Remove deprecated forecast attribute from WeatherEntity

* Fix some

* Ruff

* ipma

* buienradar

* some more

* Some more

* More and more

* strings

* attr_forecast

* Fix nws

* Fix

* remove from coverage

* Remove recorder test

* Review comments
2024-03-27 16:51:29 +01:00