1643 Commits

Author SHA1 Message Date
Jan Bouwhuis
cfc8b5fee7
Fix notify discovery setup (#68451)
* Fix notify discovery setup

* add test

* unsubscribe at reset

* Add guard

* move dispatcher to reload module

* only unsubscribe if platform was setup

* initialize dispatcher once and tests

* test get_service too

* add tests

* fix test

* use get_service for test invalid platform

* Test built-in reload method

* set to None after clearing dispatcher - tests

* Pathing services file

* Update tests/components/notify/test_init.py

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

* dispatcher is not set twice if integration loaded

* empty discovery payload

* Removed not needed services.yaml mock

* Update tests/components/notify/test_init.py

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

* flake8

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-28 08:53:30 +02:00
Erik Montnemery
0899b67578
Update selectors with frontend changes (#68623) 2022-03-26 21:41:39 -07:00
Franck Nijhof
a2a612c640
Add enable_day to duration selector (#68705) 2022-03-26 21:31:22 -07:00
Marc Mueller
911b159281
Cleanup after pylint update (#68657) 2022-03-26 00:34:12 +01:00
Marc Mueller
53245c6523
Update pylint to 2.13.0 (#68656) 2022-03-25 15:14:48 -07:00
Erik Montnemery
76103752b8
Only show light group all option in advanced mode (#68610) 2022-03-24 16:51:31 +01:00
Erik Montnemery
3068c9c9d3
Sort selectors alphabetically (#68612) 2022-03-24 13:20:16 +01:00
Erik Montnemery
c44d7205cf
Rename HelperFlowStep to HelperFlowFormStep (#68583) 2022-03-23 14:43:11 -07:00
Erik Montnemery
a50bac5cc2
Make initial group config flow step a menu (#68565) 2022-03-23 08:34:44 -07:00
Martin Hjelmare
04843a975e
Improve reload helper typing (#68558) 2022-03-23 12:10:42 +01:00
Erik Montnemery
eb068bc850
Fix targeting all or none entities in service calls (#68513)
* Fix targeting all or none entities in service calls

* Add test
2022-03-22 19:45:27 +02:00
Erik Montnemery
1b955970f8
Allow hiding and unhiding group members (#68192) 2022-03-22 12:14:34 +01:00
Erik Montnemery
b5d2c6e43a
Add config flow for threshold binary sensor (#68238)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-03-22 11:32:19 +01:00
Marc Mueller
830cc278d3
Improve CoordinatorEntity typing (#68441) 2022-03-21 10:22:30 +01:00
Paulus Schoutsen
929df2bc29
Improve error handling process_play_media_url (#68322) 2022-03-20 20:25:15 -07:00
Paulus Schoutsen
8bbbd1947d
Raise if referenced entity does not support service (#68394) 2022-03-20 16:01:58 -07:00
Paulus Schoutsen
a91888a7f8
Don't use hass.helpers (#68393) 2022-03-19 11:39:32 -10:00
Erik Montnemery
d7145095ef
Tweak selectors (#68267)
* Optionally don't convert output of duration and time selectors

* Allow number selector selection to be None

* Never convert output of duration and time selectors

* Revert "Allow number selector selection to be None"

This reverts commit b6f52c1e83dc287a30c8ef4c2e417dc20b26a1d6.
2022-03-18 10:26:05 +01:00
Paulus Schoutsen
ad1e43e083
Add support for variables on trigger (#68275) 2022-03-18 09:25:22 +01:00
Marc Mueller
eae0c75620
Make TypeVars private (2) (#68206) 2022-03-17 19:09:55 +01:00
Paulus Schoutsen
f6af93ae35
Add support for menu step (#68203) 2022-03-16 14:14:50 -07:00
Erik Montnemery
46f27fdefd
Don't prevent automations from triggering themselves (#68178) 2022-03-15 18:48:54 +01:00
Erik Montnemery
34eb4aa2d0
Exclude hidden entities from targets (#68149) 2022-03-15 08:42:22 -07:00
Erik Montnemery
8ea31cea3a
Fix deadlock when stopping queued script (#68175) 2022-03-15 08:29:04 -07:00
Erik Montnemery
1a27025793
Prevent spawning script runs when shutting down (#68170) 2022-03-15 12:46:58 +01:00
Marc Mueller
376ac1bd83
Don't import TypeVars from core modules (#68154) 2022-03-15 09:30:55 +01:00
Erik Montnemery
314175135f
Hide switch_as_x tracked entity (#67949)
* Hide switch_as_x tracked entity

* Hide wrapped switch during config flow

* Allow setting/getting entity disabled by via WS

* Adjust tests

* Improve test coverage

* Improve tests
2022-03-14 19:39:07 +01:00
Marc Mueller
41df798375
Bump mypy to 0.940 (#68007) 2022-03-11 15:57:38 -08:00
Erik Montnemery
65fbcfa0ba
Prevent recursive script calls from deadlocking (#67861)
* Prevent recursive script calls from deadlocking

* Address review comments, improve tests

* Tweak comment
2022-03-10 19:28:00 +01:00
Erik Montnemery
ee38dbd698
Add helper to set name of helper config entries (#67950) 2022-03-10 16:18:26 +01:00
Erik Montnemery
4e7d4db7ae
Align selectors with frontend updates (#67906)
* Align selectors with frontend updates

* Drop metadata from MediaSelector selection

* Adjust blueprint tests

* Address review comments

* Add tests for new selectors

* Don't stringify input

* Require min+max for number selector in slider mode

* vol.Schema does not like static methods

* Tweak
2022-03-10 16:17:59 +01:00
J. Nick Koston
aaeaed4117
Compatibility for "device_state_attributes" which was deprecated in 2021.4 has been removed (#67837)
* Small performance tweaks to _async_write_ha_state

- Only call self.available once per cycle

- Only call self.device_state_attributes once per update cycle

- Do not check for device_state_attributes if extra_state_attributes is not None

* drop backcompat

* remove prop
2022-03-09 21:39:43 +01:00
Erik Montnemery
e7fba46a06
Refactor helper_config_entry_flow (#67895) 2022-03-09 13:18:19 +01:00
J. Nick Koston
a75bbc79a2
Prevent polling from recreating an entity after removal (#67750) 2022-03-07 20:42:16 -08:00
Erik Montnemery
a9cc2d2322
Add config flow for cover, fan, light and media_player groups (#67660)
* Add options flow support to HelperConfigFlowHandler

* Add config flow for cover, fan, light and media_player groups

* Update according to review comments

* Update translation strings

* Update translation strings

* Copy schema before adding suggested values
2022-03-07 13:05:04 +01:00
Erik Montnemery
0c12914548
Add config flow for switch.light (#67447)
* Add config flow for switch.light

* Refactor according to code review

* Setup light switch from config entry

* Improve async_resolve_entity

* Prepare for multiple steps

* Remove name and options flow from switch light

* Check type before adding description to schema keys

* Remove options flow enabler

* Copy name from the switch

* Move helper flows to new file

* Improve test coverage

* Fix name

* Remove dead code from abstract method

* Remove manifest 'helper' option

* Validate registry entry id before forwarding to light platform

* Improve test

* Add translations

* Improve config entry setup

* Log when config entry fails setup

* Update homeassistant/components/switch/__init__.py

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>

Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-03-04 20:02:17 +01:00
Erik Montnemery
cd25769667
Rename async_resolve_entity_ids to async_validate_entity_ids (#67603) 2022-03-04 09:51:53 +01:00
Richard T. Schaefer
15580281a3
Allow area, device, and entity selectors to optionally support multiple selections like target selector (#63138)
* Allow area, device, and entity selectors to optionally support multiple selections like target selector

* Update according to code review comments

* Adjust tests

* Update according to review comments

* Tweak error message for multiple entities

Co-authored-by: Erik <erik@montnemery.com>
2022-03-03 10:35:06 +01:00
Mike Degatano
4ea6ca7f91
Prefer internal docker URL for VLC telnet when possible (#67090) 2022-03-01 21:56:20 -08:00
Paulus Schoutsen
65eefcacfc
Add support for detecting hostname based addresses as internal (#67407) 2022-03-01 16:56:05 -08:00
Marc Mueller
ec980a574b
Improve typing [util.decorator] (#67087) 2022-02-23 20:58:42 +01:00
Franck Nijhof
3afadf8adb
Revert "Block peer certs on supervisor" (#67104) 2022-02-23 12:32:07 +01:00
Paulus Schoutsen
938b64081b
Block peer certs on supervisor (#66837)
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
2022-02-22 13:59:40 -08:00
Paulus Schoutsen
756e711850
Add a new validate config WS command (#67057) 2022-02-22 22:28:37 +01:00
Paulus Schoutsen
c2e62e4d9f
Re-org device automations (#67064)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-02-22 13:15:16 -08:00
Erik Montnemery
ec67dcb620
Add support for validating and serializing selectors (#66565)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-02-18 14:24:08 -08:00
Marc Mueller
30e2411761
Add type ignore error codes [last ones] (#66816) 2022-02-18 18:15:57 +01:00
Marc Mueller
bfb1abd3a2
Add type ignore error codes [helpers] (#66776) 2022-02-18 11:31:37 +01:00
Joakim Sørensen
0ac9376ee4
Add list to async_delay_save typing (#66795) 2022-02-18 11:07:14 +01:00
Marc Mueller
1a247f7d1b
Improve device_automation typing (#66621) 2022-02-17 22:08:43 +01:00