Commit graph

21 commits

Author SHA1 Message Date
Ville Skyttä
0095c6baeb
Improve device trigger type hinting () 2021-08-22 20:32:50 +02:00
Erik Montnemery
79ee112490
Enable basic type checking for mqtt ()
* Enable basic type checking for mqtt

* Tweak
2021-07-05 10:33:12 +02:00
Erik Montnemery
76c3058d15
Rename device trigger base schema to DEVICE_TRIGGER_BASE_SCHEMA () 2021-06-10 19:11:38 +02:00
jan iversen
9410aefd0d
Integrations m*: Rename HomeAssistantType to HomeAssistant. () 2021-04-22 14:53:37 -07:00
Erik Montnemery
72281f4718
Validate device trigger schemas once () 2021-03-26 08:09:21 +01:00
Marc Mueller
4cb7718192
Update typing 16 () 2021-03-18 22:58:19 +01:00
Marc Mueller
25a13d1554
Update typing 10 () 2021-03-18 13:07:04 +01:00
Erik Montnemery
19cd29affa
Fix MQTT trigger where wanted payload may be parsed as an integer () 2021-02-28 12:19:27 -08:00
Erik Montnemery
047f16772f
Support templating MQTT triggers ()
* Add support for limited templates (no HASS access)

* Pass variables to automation triggers

* Support templates in MQTT triggers

* Spelling

* Handle trigger referenced by variables

* Raise on unsupported function in limited templates

* Validate MQTT trigger schema in MQTT device trigger

* Add trigger_variables to automation config schema

* Don't print stacktrace when setting up trigger throws

* Make pylint happy

* Add trigger_variables to variables

* Add debug prints, document limited template

* Add tests

* Validate MQTT trigger topic early when possible

* Improve valid_subscribe_topic_template
2021-02-08 10:50:38 +01:00
Erik Montnemery
b85efd343f
Move MQTT entity helpers to separate file ()
* Move MQTT entity helpers to separate file

* Fix imports

* Update MQTT number

* Review comments

* Fix formatting
2021-01-09 00:47:17 +01:00
Erik Montnemery
34bd70aee6
Fix race when handling MQTT discovery messages ()
* Fix race when handling MQTT discovery messages

* Lint

* retrigger checks
2021-01-04 12:28:17 +01:00
Erik Montnemery
97edbaa85f
Small cleanup of MQTT ()
* Use relative imports of mqtt component in mqtt platforms

* Correct parameters to _async_setup_entity

* Lint
2020-12-10 21:30:07 +01:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Phil Bruckner
ca9dd0c833
Reorganize trigger code () 2020-08-17 11:54:56 -05:00
Ville Skyttä
ac0dbb17af
Attrs cleanups () 2020-07-14 10:30:30 -07:00
Erik Montnemery
f1af5b71e2
Correct MQTT device trigger reconfiguration with same topic () 2020-05-28 15:50:23 -07:00
Erik Montnemery
fb93b79b12
Add MQTT debug info ()
* Add MQTT debug info

* Tweaks

* Tweaks
2020-04-01 10:00:40 -07:00
Erik Montnemery
8bc542776b
Cleanup entity and device registry on MQTT discovery removal ()
* Cleanup entity and device registry on MQTT discovery removal.

* Review comments
2020-03-11 18:00:47 -07:00
Erik Montnemery
324dfe07b4
Clear discovery topic for MQTT device triggers () 2020-03-09 21:59:38 -07:00
Erik Montnemery
7e387f93d6
Add MQTT WS command to remove device ()
* Add MQTT WS command to remove device

* Review comments, fix test

* Fix tests
2020-02-24 20:46:02 -08:00
Erik Montnemery
60ae85564e
Add support for MQTT device triggers ()
* Add support for MQTT device triggers

* Fix test, tweaks

* Improve test coverage

* Address review comments, improve tests

* Tidy up exception handling

* Fix abbreviations

* Rewrite to handle update of attached triggers

* Update abbreviation test

* Refactor according to review comments

* Refactor according to review comments

* Improve trigger removal

* Further refactoring
2020-02-18 13:51:10 -08:00