Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
* Improve lists for MQTT integration
* Extra diagnostics tests
* Revert changes where the original version was probably faster
* Revert change to gather and await in series
* Allow Just-in-Time platform setup for mqtt
* Only forward the setup of new platforms
* Fix new platforms being setup at reload + test
* Revert not related changes
* Remove unused partial
* Address comments, only import plaforms if needed
* Apply suggestions from code review
* Add multipl platform discovery test
* Improve test
* Use a lock per platform
* add deprecaction
* Deprecate old config options for mqtt json light
* Do not deprecate brightness flag
* Enable brightness support by default
* Keep `false` as default for brightness flag
* Add warnings and register issue
* log warning and register on use of color_mode flag
* Remove redundant cv.deprecated logging + follow up comments
* Avoid circular import in Storage.async_delay_save
We call Storage.async_delay_save for every entity being added or removed
from the registry. The late import took more time than everything else
in the function.
* Avoid reschedule churn in Storage.async_delay_save
When we are adding or removing entities we will call async_delay_save
quite often which has to add and remove a TimerHandle on the event loop
which can add up when there are a lot of registry items changing.
If the timer handle still has 80% of the time remaining on it
we will avoid resceduling and let it fire at the time the
original async_delay_save call was made. This ensures we
do not force the event loop to rebuild its heapq because
too many timer handlers were cancelled at once
* div0
* add coverage for 0 since we had none
* fix bad conflict
* tweaks
* tweaks
* tweaks
* tweaks
* tweaks
* tweaks
* more test fixes
* mqtt tests rely on event loop overhead
This test currently relies on event loop overhead and since #110899
will remove another task in the config entry init flow, it needs
another async_block_till_done. In the future it should be refactored
to have better synchronization without having to rely on iterations
of the event loop.
* Add toggle service to climate
* Fix mqtt test
* Add comments
* Fix rebase
* Remove not needed properties
* Fix toggle service
* Fix test
* Test
* Mod mqtt test
---------
Co-authored-by: G Johansson <goran.johansson@shiftit.se>
* Simplify MQTT device trigger
* Add test non unique trigger_id
* Adjust deprecation warning
* Make discovery_id optional
* refactor double if
* Improve validation, add tests and deprecation comments
* Avoid breaking change
* Inmprove error message
* Match on discovery_id instead of discovery_info
* Revert an unrelated change
* follow up comments
* Add comment and test on device update with non unique trigger
* Update homeassistant/components/mqtt/device_trigger.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Update homeassistant/components/mqtt/device_trigger.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
---------
Co-authored-by: Erik Montnemery <erik@montnemery.com>