Erik Montnemery
114a7226d6
Wait before sending MQTT birth message ( #39120 )
...
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-25 16:42:24 +02:00
Erik Montnemery
ee043d8614
Wait for broker to ACK MQTT operations ( #39051 )
...
* Wait for broker to ACK MQTT operations
* Deduplicate new code
* Fix tests
* Improve test
* Don't hold PAHO lock when waiting for ACK
* Fix tests
* Add constant for ACK timeout
2020-08-21 17:00:13 +02:00
Erik Montnemery
fa0e12ffe8
Use keywords for MQTT birth and will ( #38040 )
2020-07-21 14:10:34 -07:00
Erik Montnemery
908b72370b
Correct arguments to MQTT will_set ( #38036 )
2020-07-21 12:36:21 -07:00
Erik Montnemery
b63655057c
Publish birth and will messages by default ( #37371 )
...
* Publish birth and will messages by default
* Remove useless copy
2020-07-04 17:49:08 +02:00
Erik Montnemery
bb17cbdd83
Drop MQTT broker tls_version parameter ( #37033 )
2020-06-23 12:12:37 -07:00
Erik Montnemery
1b3e5460a9
Remove embedded MQTT broker ( #37032 )
2020-06-23 09:51:50 -07:00
Erik Montnemery
747490ab34
Support reconfiguring MQTT config entry ( #36537 )
2020-06-22 17:49:01 -07:00
Erik Montnemery
a2e2c35011
Use pytest for more MQTT tests ( #36859 )
...
* Use pytest for more MQTT tests
* Address review comments
* Break out PAHO client mock in separate fixture.
* tweak.
2020-06-22 22:02:29 +02:00
Erik Montnemery
16cf16e418
Update MQTT tests to not create duplicated config entries ( #36833 )
2020-06-15 15:38:56 -07:00
Paulus Schoutsen
c33edbe5bb
Use TestCase.addCleanup ( #36560 )
2020-06-08 12:26:40 -07:00
Erik Montnemery
35cd6b9abf
Remove unused parameter for MQTT discovery ( #36526 )
...
* Remove unused parameter for MQTT discovery
* Fix tests
2020-06-07 19:35:35 +02:00
Erik Montnemery
8de863ecf1
Let PAHO MQTT client handle connection to MQTT server ( #35983 )
...
* Let PAHO client handle connection to MQTT server
2020-05-26 17:12:22 +02:00
Erik Montnemery
f1ecac92df
Fail tests if wrapped callbacks or coroutines throw ( #35010 )
2020-05-06 14:14:57 -07:00
Erik Montnemery
2b13a8cde4
Include QoS and retain in MQTT debug info ( #35011 )
2020-05-01 08:41:57 -07:00
Erik Montnemery
82a478e2fb
Fix MQTT debug info for same topic ( #34952 )
2020-04-30 22:34:44 -07:00
Paulus Schoutsen
ec47216388
Use built-in test helpers on 3.8 ( #34901 )
2020-04-30 13:29:50 -07:00
Paulus Schoutsen
454c5d824a
Attempt to fix CI ( #34800 )
2020-04-28 10:31:22 -07:00
Paulus Schoutsen
0d700f6a63
Fix tests for Python 3.8 ( #34672 )
2020-04-25 14:32:55 -07:00
Erik Montnemery
4448eb94a1
Only subscribe when MQTT client is connected. ( #34557 )
2020-04-22 14:38:04 -07:00
Erik Montnemery
6631bbc6f5
Remove reconnect logic from MQTT client. ( #34556 )
2020-04-22 14:28:36 -07:00
Erik Montnemery
877eb0c3ad
Don't log same MQTT message multiple times ( #34511 )
2020-04-21 16:48:04 -07:00
springstan
78d87dc40f
Use TEMP_CELSIUS constant ( #33963 )
2020-04-10 19:17:46 +02:00
Erik Montnemery
ddef681dd2
Improve MQTT debug info for subscriptions with wildcard ( #33752 )
2020-04-07 09:38:22 -07:00
Erik Montnemery
f3b6575272
Fix MQTT debug info for subscriptions with wildcard. ( #33744 )
2020-04-06 10:25:09 -07:00
Franck Nijhof
98a2efcbab
Collection of random (mainly) test improvements ( #33733 )
2020-04-06 12:51:48 +02:00
Erik Montnemery
4e6fd19624
Improve MQTT test coverage and remove dead code ( #33584 )
...
* Improve MQTT tests and remove dead code
* Remove useless test.
* Add more test
2020-04-03 09:05:58 -07:00
Ziv
8fbdc703e0
Fix uncaught exceptions for mqtt ( #33547 )
...
now all mqtt tests pass
2020-04-02 15:18:30 -07:00
David F. Mulcahey
201e958854
Use mock storage for MQTT tests ( #33553 )
...
* mock storage for MQTT
* more mqtt storage mocks
2020-04-02 17:13:44 -05:00
Erik Montnemery
fb93b79b12
Add MQTT debug info ( #33461 )
...
* Add MQTT debug info
* Tweaks
* Tweaks
2020-04-01 10:00:40 -07:00
Erik Montnemery
2d6b80470f
Improve error handling ( #32182 )
2020-02-25 10:44:24 -08:00
Erik Montnemery
7e387f93d6
Add MQTT WS command to remove device ( #31989 )
...
* Add MQTT WS command to remove device
* Review comments, fix test
* Fix tests
2020-02-24 20:46:02 -08:00
Paulus Schoutsen
81dbdc6b9c
Add dump service to MQTT integration ( #31370 )
...
* Add dump service to MQTT integration
* Lint
2020-02-02 15:01:51 -08:00
Franck Nijhof
e642d95d0f
Migrate collection of component tests from coroutine to async/await ( #30504 )
2020-01-06 01:22:22 +01:00
Bas Nijholt
ce5072fc91
use isort to sort imports according to PEP8 for mqtt ( #29649 )
2019-12-08 22:45:26 +05:30
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Penny Wood
84e6813779
Rename via_hub to via_device ( #24360 )
...
* Rename via_hub to via_device
* Fixed registry interactions
2019-06-10 09:10:44 -07:00
Erik Montnemery
a89c7f8feb
Improve MQTT tests ( #23296 )
...
* Improve MQTT tests
* Tweak
2019-04-22 08:48:50 -04:00
Paulus Schoutsen
590eead128
Test fixes ( #22911 )
...
* Fix light tests [skip ci]
* Fix tests/common
* Fix some mqtt tests [skip ci]
* Fix tests and component manifests which have only one platform
* Fix more tests and manifests
* Fix demo/notify tests
* Rollback test for demo.geo_location
2019-04-08 23:16:55 -07:00
Kyle Niewiada
a5a926bcc6
Raise ConfigEntryNotReady for MQTT connection exception ( #22540 )
...
* Raise ConfigEntryNotReady for connection exception
Raise ConfigEntryNotReady for the connection exception like if the MQTT Server container/device is being restarted or was unavailable on boot.
* Add new exception
* grammar fix
* Possibly resolve hound comments
* raise `ConfigEntryNotReady` for mqtt connection error
* revert exceptions.py
* Update exceptions.py
* modify test to handle exception
* use constants to control exception scope
* Raise ConfigEntryNotReady for connection exception
Raise ConfigEntryNotReady for the connection exception like if the MQTT Server container/device is being restarted or was unavailable on boot.
* Add new exception
* Add new exception
* grammar fix
* Possibly resolve hound comments
* raise `ConfigEntryNotReady` for mqtt connection error
* revert exceptions.py
* Update exceptions.py
* modify test to handle exception
* use constants to control exception scope
* revert test change as it's not the same thing
* Update test_init.py
* Add test for MQTT OSError
* revert file changes from a bad rebase
* Rewrite test with valid syntax
* rewrite test to be less ambiguous
* add empty line
* add back 'axis'
* Remove empty line
* Update tests and undo merge from earlier
* correctly restore test for no connect broker
* fix test mock correctly
* line was too long. hit enter.
2019-04-03 21:51:01 -07:00
emontnemery
5957e4b75b
Pass Message object to MQTT message callbacks ( #21959 )
...
* Pass Message object to MQTT message callbacks
* Improve method of detecting deprecated msg callback
* Fix mysensors
* Fixup
* Review comments
* Fix merge error
2019-03-13 12:58:20 -07:00
Paulus Schoutsen
429bbc05dc
Add WS subscription command for MQTT ( #21696 )
...
* Add WS subscription command for MQTT
* Add test
* Add check for connected
* Rename event_listeners to subscriptions
2019-03-10 20:07:09 -07:00
emontnemery
648adcc708
Small cleanup of MQTT platforms ( #20503 )
...
* Move CONF_UNIQUE_ID to init
* Sort imports
* Update ordering
2019-01-27 18:54:52 +01:00
emontnemery
6800871c13
Log exceptions thrown by signal callbacks ( #20015 )
...
* Log exceptions thrown by signal callbacks
* Fix unsub
* Simplify traceback print
* Typing
* Add test
* lint
* Review comments
* Rework MQTT test case
* Fix bad merge
* Fix bad merge
2019-01-17 14:44:57 -08:00
emontnemery
368682647d
Log exceptions thrown by MQTT message callbacks ( #19977 )
...
* Log exceptions thrown by MQTT message callbacks
* Fix tests
* Correct method for skipping wrapper in traceback
* Lint
* Simplify traceback print
* Add test
* Move wrapper to common helper function
* Typing
* Lint
2019-01-16 13:50:21 -08:00
Fredrik Erlandsson
b9a488912a
Add support for 'via_hub' for device_info ( #19454 )
...
* Add support for 'via_hub'
* Update config schema
* add domain to via_hub
* add tests for via_hub
2019-01-11 13:11:13 -08:00
Paulus Schoutsen
df21dd21f2
RFC: Call services directly ( #18720 )
...
* Call services directly
* Simplify
* Type
* Lint
* Update name
* Fix tests
* Catch exceptions in HTTP view
* Lint
* Handle ServiceNotFound in API endpoints that call services
* Type
* Don't crash recorder on non-JSON serializable objects
2018-11-30 21:28:35 +01:00
Paulus Schoutsen
08fe7c3ece
Pytest tests ( #17750 )
...
* Convert core tests
* Convert component tests to use pytest assert
* Lint 🤷♂️
* Fix test
* Fix 3 typos in docs
2018-10-24 12:10:05 +02:00
Otto Winter
af2402ea59
Implement base for MQTT device registry integration ( #16943 )
...
* Implement base for MQTT device registry integration
* Lint
* Lint
* Address comments
* Lint
* Lint
* Address comments
* Only add keys if specified
See https://github.com/home-assistant/home-assistant/pull/17136#discussion_r223267185
2018-10-08 12:53:30 +02:00
Paulus Schoutsen
72e746d240
MQTT config entry ( #16594 )
...
* MQTT config entry
* Solely rely on config entry
* Improve wawrning
* Lint
* Lint2
2018-09-14 11:57:31 +02:00