Commit graph

35 commits

Author SHA1 Message Date
Jan Bouwhuis
657e7f9a4c
Simplify MQTT test for setup manual mqtt item from yaml ()
simplify test setup manual mqtt item from yaml
2022-06-13 13:44:12 +02:00
Jan Bouwhuis
52561ce076
Update MQTT tests to use the config entry setup ()
* New testframework and tests for fan platform

* Merge test_common_new to test_common

* Add alarm_control_panel

* Add binary_sensor

* Add button

* Add camera

* Add climate

* Add config_flow

* Add cover

* Add device_tracker_disovery

* Add device_trigger

* Add diagnostics

* Add discovery

* Add humidifier

* Add init

* Add lecacy_vacuum

* Add light_json

* Add light_template

* Add light

* Add lock

* Add number

* Add scene

* Add select

* Add sensor

* Add siren

* Add state_vacuum

* Add subscription

* Add switch

* Add tag

* Add trigger

* Add missed tests

* Add another missed test

* Add device_tracker

* Remove commented out code

* Correct tests according comments

* Improve mqtt_mock_entry and recover tests

* Split fixtures with and without yaml setup

* Update fixtures manual_mqtt

* Update fixtures mqtt_json

* Fix test tasmota

* Update fixture mqtt_room

* Revert fixture changes, improve test

* re-add test
2022-06-02 14:24:46 +02:00
Jan Bouwhuis
17669a728c
Move manual configuration of MQTT lock to the integration key ()
Add lock
2022-05-21 19:07:26 +02:00
Erik Montnemery
fe38e6ba87
Drop MQTT import flow ()
* Drop MQTT import flow

* Reload manually configured MQTT entities when config entry is setup

* Address review comments

* Actually remove the import flow
2022-02-10 21:09:57 +01:00
Erik Montnemery
8245ff7473
Log transmitted MQTT messages () 2022-02-04 17:35:32 +01:00
Jan Bouwhuis
dd0193052c
Add MQTT encoding parameter for all subscribed topics ()
* Add encoding parameter for all subscribable topics

* test setup encoding incoming payload

* remove support for device_tracker and tag+tests
2022-01-03 16:08:07 +01:00
Jan Bouwhuis
061ce0c187
Fix mqtt reloading and rework tests ()
* Improve mqtt reloading/tests and fix issues

* Cleanup fixture for reloading test

* isort and black remove replaced test_reloadable
2022-01-03 15:14:50 +01:00
Jan Bouwhuis
d0c4f0fec4
Add mqtt encoding support for publishing ()
* encoding support for mqtt publishing - todo tests

* signature allows None values for qos and retain

* common test for mqtt publishing encoding

* better test with command templates

* more tests

* fix tests alarm control panel+tests light basic

* tests light json and template

* add tests vacuum and fix tests light_template
2022-01-03 09:03:47 +01:00
Hypnos
57fd632cd9
Add missing MQTT lock.open ()
* Add missing MQTT lock.open

from:
https://community.home-assistant.io/t/mqtt-lock-open/232823/13
based on https://github.com/home-assistant/core/pull/48008

* Update homeassistant/components/mqtt/lock.py

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

* Update homeassistant/components/mqtt/lock.py

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

* Update homeassistant/components/mqtt/lock.py

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

* removed `STATE_OPEN` from tests

* Apply suggestions from code review

* Format code

* Update lock.py

* Update test_lock.py

* Update test_lock.py

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-11-25 15:54:08 +01:00
Erik Montnemery
640a7fee9d
Allow extra keys in MQTT discovery messages ()
* Allow extra keys in MQTT discovery messages

* Remove extra keys
2021-10-25 13:47:06 +02:00
Erik Montnemery
3b89fcfe83
Filter MQTT lock JSON attributes () 2021-06-29 11:16:07 +02:00
Franck Nijhof
65cf2fcb6f
Drop asynctest () 2021-01-01 22:31:56 +01:00
Erik Montnemery
4ed1f8023b
Suppress MQTT discovery updates without changes () 2020-08-06 10:43:47 +02:00
Erik Montnemery
280f49540e
Drop use of async_mock_mqtt_component () 2020-06-22 23:59:50 +02:00
definitio
ad5101c5c0
Set state for MQTT entities to 'unavailable' when no connection to broker ()
* Report 'unavailable' state when not connected

to MQTT broker

* Fix tests

* Rewrite to remove the polling

* Add tests

* Add some fixes
2020-06-07 09:21:16 +02:00
Paulus Schoutsen
276f3afb00
Do async_setup_platform in background ()
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Erik Montnemery
f1ecac92df
Fail tests if wrapped callbacks or coroutines throw () 2020-05-06 14:14:57 -07:00
Franck Nijhof
30c6ace0f3
Rewrite MQTT & demo Lock tests ()
* Refactor tests to remove tests.lock.common

* Remove unused is_locked hass binding

* Import constants via entity component

* Import constants via entity component

* Fix light vs lock in naming
2020-04-10 00:40:51 +02:00
Erik Montnemery
fbd197146a
Add MQTT debug info for remaining MQTT integrations () 2020-04-01 11:48:32 -07:00
Erik Montnemery
9508c51403
Fix change of entity_id for discovered MQTT entities () 2020-03-30 14:26:59 -07:00
Erik Montnemery
86d48c608e
Deduplicate MQTT tests () 2020-03-17 02:09:19 -05: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
f7ddbc7e1e
Remove duplicated config from MQTT tests () 2020-03-11 09:34:19 -07:00
Erik Montnemery
4bb9f1800d
Deduplicate MQTT mixin tests ()
* Deduplicate MQTT mixin tests

* Remove test of not yet merged function
2020-03-09 09:40:00 -07:00
Iulius
1c2618d99a Add separate command and state topics for mqtt lock ()
* Update lock.py

Allow different command and state topic + different command and state values.

* Formatting updated after black run

* TC updated to reflect different state & cmd values

* Abbreviations for lock states added

* additional non-default state test

* whitespaces fixed

* black formatting run
2019-12-31 15:24:09 +01:00
Paulus Schoutsen
4de97abc3a Black 2019-07-31 12:25:30 -07:00
Erik Montnemery
5376e15286 Convert some test helpers to coroutines and adjust tests ()
* Convert some test helpers to coroutines

* Fix tests
2019-04-25 10:14:16 +02:00
Erik Montnemery
a89c7f8feb Improve MQTT tests ()
* Improve MQTT tests

* Tweak
2019-04-22 08:48:50 -04:00
Erik Montnemery
f584878204 Drop unnecessary block_till_done () 2019-04-19 14:51:48 -07:00
Erik Montnemery
38d92b2abf Fix optimistic mode and add tests () 2019-04-10 13:56:34 -07:00
emontnemery
89fc3b2a1b Disable extra=vol.ALLOW_EXTRA for MQTT platforms. () 2019-01-29 09:29:02 -08:00
emontnemery
648adcc708 Small cleanup of MQTT platforms ()
* Move CONF_UNIQUE_ID to init

* Sort imports

* Update ordering
2019-01-27 18:54:52 +01:00
emontnemery
1f93984fd5 Update device registry of MQTT Lock () 2019-01-27 17:42:45 +01:00
emontnemery
ab4e4787e3 Add JSON attribute topic to MQTT lock () 2019-01-20 16:41:50 -08:00
emontnemery
5b53bd6aa0
Move MQTT platforms under the component ()
* Move MQTT platforms under the component
2019-01-15 17:31:06 +01:00
Renamed from tests/components/lock/test_mqtt.py (Browse further)