Commit Graph

56 Commits (44befe5f11390365e2ff0a7ce03133c1edd838a9)

Author SHA1 Message Date
Erik Montnemery fe38e6ba87
Drop MQTT import flow (#66160)
* 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 (#65550) 2022-02-04 17:35:32 +01:00
Jan Bouwhuis cf52357229
Add MQTT light unknown state support (#65308)
* Add MQTT light unknown sate support

* Update homeassistant/components/mqtt/light/schema_basic.py

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

* Update homeassistant/components/mqtt/light/schema_json.py

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

* Update homeassistant/components/mqtt/light/schema_template.py

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

* Update tests for default unknown state

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-02-03 16:49:57 +01:00
Erik Montnemery 1995a825f3
Reject MQTT light discovery using unsupported value_template (#62682)
* Reject MQTT light discovery using unsupported value_template

* Tweak
2022-01-03 17:16:26 +01:00
Jan Bouwhuis dd0193052c
Add MQTT encoding parameter for all subscribed topics (#62263)
* 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 (#62950)
* 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 (#62739)
* 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
Paulus Schoutsen 31153ac155
Move fixtures part 1 (#58902) 2021-11-01 20:47:05 -07:00
Erik Montnemery 640a7fee9d
Allow extra keys in MQTT discovery messages (#58390)
* Allow extra keys in MQTT discovery messages

* Remove extra keys
2021-10-25 13:47:06 +02:00
Paulus Schoutsen a4d9019ffc
Refactor persistent notification to no longer route all data via a service (#57157)
* Convert persistent notification tests to async

* Create/dismiss persistent notifications in exposed functions, not service calls

* Fix notify persistent_notification

* Remove setting up persistent_notification

* Drop more setups

* Empty methods

* Undeprecate sync methods because too big task

* Fix setup clearing notifications

* Fix a bunch of tests

* Fix more tests

* Uno mas

* Test persistent notification events

* Clean up stale comment

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2021-10-07 12:58:00 +02:00
J. Nick Koston e6e8d7eded
Convert color temperature to visible color in lights (#55219) 2021-08-25 21:56:36 +02:00
Erik Montnemery 7a4f3fe7b8
Filter MQTT light JSON attributes (#52242) 2021-06-28 14:37:26 +02:00
Erik Montnemery 52c142a82d
Add support for color_mode white to MQTT light basic schema (#51484)
* Add support for color_mode white to MQTT light basic schema

* Add missing abbreviations
2021-06-22 11:59:20 +02:00
Erik Montnemery a4587b5f3b
Deprecate support for undocumented value_template in MQTT light (#51589) 2021-06-08 08:23:51 +02:00
Erik Montnemery 870c61a622
Add color_mode support to MQTT light with basic schema (#50464)
* Add color_mode support to MQTT light with basic schema

* Update abbreviations

* Silence pylint

* Improve test coverage

* Apply suggestions from code review
2021-05-24 11:37:02 +02:00
Erik Montnemery 9f2fb37e17
Flag brightness support for MQTT RGB lights (#48718) 2021-04-06 12:39:29 +02:00
Franck Nijhof ad13a9295e
Merge multiple context managers in tests (#48146) 2021-03-27 09:17:15 +01:00
Franck Nijhof 65cf2fcb6f
Drop asynctest (#44746) 2021-01-01 22:31:56 +01:00
Erik Montnemery b45fa29077
Force color or white mode exclusivity for MQTT lights (#42887) 2020-11-09 12:51:01 +01:00
Paulus Schoutsen 6380ebd1eb
Fix MQTT publish from a script with templates (#42398) 2020-10-26 16:46:26 +01:00
Erik Montnemery e203896638
Align MQTT light's default color temperature (#41842) 2020-10-21 15:46:29 +02:00
Erik Montnemery 306ee30574
Enable MQTT discovery by default (#41361) 2020-10-07 14:51:06 +02:00
Franck Nijhof ee914366a8
Add native Python types support to templates (#41227)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-10-07 00:05:52 +02:00
Erik Montnemery 4d6e694d14
Fix discovery update of MQTT state templates (#39901) 2020-09-10 20:52:23 +02:00
Erik Montnemery 9aba1985c7
Fix MQTT light value template (#39820) 2020-09-08 23:11:42 +02:00
J. Nick Koston 65e53b8251
Support reloading mqtt yaml configuration (#39531) 2020-09-02 20:16:21 -05:00
Erik Montnemery 4c6960ed36
Fix discovery update of MQTT light (#39325) 2020-09-02 10:52:33 +02:00
Erik Montnemery 4ed1f8023b
Suppress MQTT discovery updates without changes (#38568) 2020-08-06 10:43:47 +02:00
Erik Montnemery 280f49540e
Drop use of async_mock_mqtt_component (#37011) 2020-06-22 23:59:50 +02:00
Erik Montnemery 16cf16e418
Update MQTT tests to not create duplicated config entries (#36833) 2020-06-15 15:38:56 -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
definitio ad5101c5c0
Set state for MQTT entities to 'unavailable' when no connection to broker (#36479)
* 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 (#36244)
Co-authored-by: J. Nick Koston <nick@koston.org>
2020-05-31 22:18:30 -07:00
Pieter Goetschalckx 02a36a9b68
Add min_mireds and max_mireds to MQTT Light (#32613)
* Add min_mireds and max_mireds to MQTT Light

* Add abbreviations for min_mireds and max_mireds

* Add tests for min_mireds and max_mireds
2020-05-10 09:34:48 +02:00
Erik Montnemery f1ecac92df
Fail tests if wrapped callbacks or coroutines throw (#35010) 2020-05-06 14:14:57 -07:00
Erik Montnemery f9b420a5a5
Make sure MQTT light brightness is not rounded to 0 (#35207) 2020-05-04 15:54:49 -07:00
Paulus Schoutsen ec47216388
Use built-in test helpers on 3.8 (#34901) 2020-04-30 13:29:50 -07:00
Paulus Schoutsen 0d700f6a63
Fix tests for Python 3.8 (#34672) 2020-04-25 14:32:55 -07:00
Erik Montnemery fbd197146a
Add MQTT debug info for remaining MQTT integrations (#33506) 2020-04-01 11:48:32 -07:00
Erik Montnemery 9508c51403
Fix change of entity_id for discovered MQTT entities (#33444) 2020-03-30 14:26:59 -07:00
Erik Montnemery 52a4c16980
Improve MQTT light test coverage (#32907) 2020-03-17 18:29:12 -05:00
Erik Montnemery 86d48c608e
Deduplicate MQTT tests (#32874) 2020-03-17 02:09:19 -05:00
Erik Montnemery 8bc542776b
Cleanup entity and device registry on MQTT discovery removal (#32693)
* 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 (#32689) 2020-03-11 09:34:19 -07:00
Erik Montnemery 4bb9f1800d
Deduplicate MQTT mixin tests (#32563)
* Deduplicate MQTT mixin tests

* Remove test of not yet merged function
2020-03-09 09:40:00 -07:00
Ville Skyttä e6388e186c
Remove unnecessary string literal concatenations (#30360) 2020-01-02 21:17:10 +02: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 (#23352)
* Convert some test helpers to coroutines

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

* Tweak
2019-04-22 08:48:50 -04:00
Erik Montnemery 416af5cf57 Drop unnecessary block_till_done (#23250) 2019-04-19 14:10:48 -07:00