Commit graph

927 commits

Author SHA1 Message Date
Paulus Schoutsen
95a890c6e1
Get_url to prefer external URL if SSL configured () 2022-02-07 15:44:02 -08:00
Franck Nijhof
fa09cf663e
Update black to 22.1.0 () 2022-02-05 14:19:37 +01:00
Paulus Schoutsen
a6caf3f579
Call out 3rd party containers more clearly () 2022-02-04 09:57:14 -08:00
mk-maddin
efb6fd1569
Fix script / automation repeat with count 0 fails ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-02-03 08:18:58 -08:00
Dave T
bf910229b6
Add test: warn entity_category assigned as str () 2022-01-28 21:46:57 +01:00
Erik Montnemery
dccc4eba76
Remove artifacts from black formatting ()
* Remove artifacts from black formatting

* Tweak
2022-01-28 17:00:01 +02:00
Erik Montnemery
94288886c3
Abort webhook flow when not connected to home assistant cloud () 2022-01-26 10:57:45 -08:00
J. Nick Koston
2083f0b3c0
Add support for checking if an entity is explicitly included in an entity filter () 2022-01-19 22:38:48 -08:00
Paulus Schoutsen
8d7cca9774
Convert discovery tests to async () 2022-01-19 12:21:15 +01:00
Erik Montnemery
a8c14835b9
Add entity options to entity registry ()
* Initial commit for entity options

* Tweak broadlink tests

* Add async_update_entity_options + test
2022-01-18 22:47:46 +01:00
epenet
b71a22557d
Use Platform enum in load_platform [tests] ()
* Use Platform enum in numato tests

* Use Platform enum in discovery tests

* Adjust load_platform argument

Co-authored-by: epenet <epenet@users.noreply.github.com>
2022-01-12 15:07:30 +01:00
Stefan Agner
42706f780c
Convert disabled_by to DeviceEntryDisabler on load ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-01-11 20:50:32 -08:00
Petro31
9c6c13a55c
Add is_number as a test for use in select, selectattr, reject, and re… () 2022-01-10 13:00:43 +01:00
Paulus Schoutsen
689504af86
Raise if trying to store mocks in storage () 2022-01-09 21:20:21 -08:00
Erik Montnemery
fc2025509e
Teach call service script action about entity registry ids () 2022-01-07 08:42:47 -08:00
Erik Montnemery
6d57dbde68
Support passing callbacks to start.async_at_start ()
* Support passing callbacks to start.async_at_start

* Update homeassistant/helpers/start.py

Co-authored-by: Franck Nijhof <git@frenck.dev>

* Fix imports

Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-01-05 18:04:09 +01:00
avee87
04606f05a4
Use built-in Jinja min and max filters in templates ()
* Use built-in Jinja min and max filters in templates

* use built-in filter for global

* lint

* less generic name

* more tests

* even more tests
2022-01-04 10:07:23 +01:00
Franck Nijhof
07e034c1c6
Add iif (immediate if) template function/filter () 2021-12-21 17:25:07 +01:00
Erik Montnemery
cbcd6d458e
Assert current state of script condition validation in tests () 2021-12-21 14:10:05 +01:00
Erik Montnemery
e2fca2e305
Support shorthand templates in condition actions ()
* Support shorthand templates in condition actions

* Fix validation message

* Fix tests
2021-12-21 12:19:31 +01:00
Brynley McDonald
26dc526234
Add slugify as a template filter () 2021-12-21 11:35:54 +01:00
J. Nick Koston
a40549c1b9
Fix hw_version not updating from an entity device_info () 2021-12-18 21:53:49 -08:00
Robert Hillis
626a3f35f5
Use enums in helpers tests () 2021-12-17 11:09:24 +01:00
J. Nick Koston
04153c0075
Add hardware version to the device registry () 2021-12-16 05:16:19 -06:00
Ville Skyttä
5bf67cac66
Use RegistryEntryDisabler () 2021-12-15 23:25:40 +02:00
Ville Skyttä
7db3246de4
Make config entry disabled_by an enum ()
* Make config entry disabled_by an enum

* Update homeassistant/config_entries.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-12-15 20:53:21 +01:00
epenet
c05eca1c82
Remove log flooding prevention logic from discovery info ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 10:28:26 -10:00
epenet
9f15e7dcf4
Fix flaky tests around frame helper ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-08 10:50:56 +01:00
epenet
b8b4855b8e
Prevent log flooding in frame helper ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-06 15:26:31 -08:00
Paulus Schoutsen
a59ec9ca5e
Handle invalid device registry entry type ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-12-04 09:20:12 +01:00
Erik Montnemery
17dc609363
Correct validation of conditions in scripts and automations ()
* Correct validation of conditions in scripts and automations

* Fix test
2021-12-03 09:08:28 -08:00
Jan Bouwhuis
3188a364e2
Add template filters pack and unpack ()
* add pack and unpack template filters

* Add unpack test with offset

* use unpack_from

* Simplify unpack_from statement
2021-12-03 08:58:15 +01:00
Erik Montnemery
9f4a99fe81
Revert "Add bytes support for bitwise template operations" () 2021-12-03 08:50:29 +01:00
Erik Montnemery
0e3bc21d54
Teach state and numeric_state conditions about entity registry ids () 2021-12-02 14:55:12 -08:00
Erik Montnemery
a07f75c6b0
Revert "Allow template int filter to render from a bytes based integer" () 2021-12-02 14:37:19 -08:00
Ville Skyttä
4107063a5a
Make entity registry disabled_by an enum () 2021-12-02 18:02:29 +01:00
Erik Montnemery
c85bb27d0d
Teach state trigger about entity registry ids ()
* Teach state trigger about entity registry ids

* Tweak

* Add tests

* Tweak tests

* Fix tests

* Resolve entity ids during config validation

* Update device_triggers

* Fix mistake

* Tweak trigger validator to ensure we don't modify the original config

* Add index from entry id to entry

* Update scaffold

* Pre-compile UUID regex

* Address review comment

* Tweak mock_registry

* Tweak

* Apply suggestion from code review
2021-12-02 14:26:45 +01:00
Joakim Plate
c54ca7941f
Make sure entity inherit disabled device () 2021-12-01 13:59:57 -08:00
Franck Nijhof
c28b45cd83
Migrate entity categories to StrEnum () 2021-12-01 13:54:36 +01:00
Jan Bouwhuis
f07e676c82
Allow template int filter to render from a bytes based integer ()
* Allow template int to render bytes

* re-triggering tests

* Add warning when base !=10 and rendering bytes

* re-trigger tests

* Re-trigger tests

* remove period

* Update homeassistant/helpers/template.py

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

* Fix logger syntax

* remove parentheses

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-30 15:01:43 +01:00
epenet
ec1c52d945
Use dataclass for SsdpServiceInfo ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-29 06:10:07 -10:00
Erik Montnemery
caf5ee2fab
Remove optional validation when creating conditions () 2021-11-28 14:54:07 +01:00
Erik Montnemery
ea102f71a6
Correct validation of repeats in scripts and automations ()
* Correct validation of repeats in scripts and automations

* Improve validation test
2021-11-26 14:12:59 +01:00
epenet
75057949d1
Adjust async_step_discovery methods for BaseServiceInfo ()
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-11-24 19:30:02 -06:00
Ville Skyttä
9f4de8df18
Make device entry disabled by an enum () 2021-11-24 22:32:16 +01:00
Erik Montnemery
7b57033265
Correct today_at template function / filter ()
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-11-24 15:51:43 +01:00
Jan Bouwhuis
d33457b7bc
Add bytes support for bitwise template operations ()
* Add bytes support for bitwise template operations

* spelling

* Update bitwise tests

* remove try block for bytes conversion

* do not accept empty `bytes` object
2021-11-24 15:15:27 +01:00
Jan Bouwhuis
d41d223033
Add UNIX timestamp detection to as_datetime template filter () 2021-11-24 09:51:56 +01:00
Jan Bouwhuis
fa0d3a6c48
Change output template filters timestamp_local and timestamp_utc to isoformat () 2021-11-24 09:49:03 +01:00
Erik Montnemery
c0d2a66609
Add stable ID to entity registry entries ()
* Add UUID to entity registry entries

* Fix test
2021-11-24 09:01:35 +01:00