Commit graph

13 commits

Author SHA1 Message Date
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