Commit Graph

993 Commits (d2bd45099b072e65626b3a826812c06b448d7632)

Author SHA1 Message Date
Jan Bouwhuis 689421eddf
Move blocking code to executor job in MQTT CI test helper (#138815) 2025-02-19 06:14:07 +01:00
skobow f8ffbf0506
Set clean_start=True on connect to MQTT broker (#136026)
* Addresses #135443: Set  on connect.

* Make clean start implementation compatible with v2 API

* Add tests

* Do not pass default value for `clean_start` on_connect

* Revert "Do not pass default value for `clean_start` on_connect"

This reverts commit 75806736cf.

* Use partial top pass kwargs to mqtt client connect

---------

Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
Co-authored-by: jbouwh <jan@jbsoft.nl>
2025-02-18 23:11:21 +01:00
Jan Bouwhuis 33df208296
Fix temp files of mqtt CI tests not cleaned up properly (#138741)
* Fix temp files of mqtt CI tests not cleaned up properly

* Do not cleanup tempfiles, patch gettempdir only
2025-02-18 08:38:43 +01:00
Jan Bouwhuis d6b7762dd6
Upgrade paho-mqtt API to v2 (#137613)
* Upgrade paho-mqtt API to v2

* Refactor on_connect callback

* Add tests

* Fix Tasmota tests
2025-02-13 22:13:19 +01:00
Jan Bouwhuis d3d00357aa
Allow to omit the payload attribute to MQTT publish action to allow an empty payload to be sent by default (#137595)
Allow to omit the payload attribute to MQTT publish actionto allow an empty payload to be sent by default
2025-02-06 22:11:39 +02:00
Jan Bouwhuis 7fa6f7e875
Bump paho-mqtt client to version 2.1.0 (#136130)
* Bump paho-mqtt client to version 2.1.0

* Remove commented code

* Bump pyeconet==0.1.26

* Ensure types-paho-mqtt==1.6.0.20240321 is uninstalled if test requirements are updated

* Update roombapy dependency

* Remove pyeconet from exceptions list

* Revert changes to install test requirements task
2025-02-04 20:59:28 +01:00
Jan Bouwhuis efc515ff4e
Remove legacy color_mode support for legacy mqtt json light (#136996) 2025-02-04 12:34:36 +01:00
Marc Mueller 30c0a1492c
Update codespell to 2.4.1 (#137312) 2025-02-04 12:16:24 +01:00
Jan Bouwhuis 30af9057d1
Ensure random temp dir is used during MQTT CI tests (#137221) 2025-02-03 16:06:02 +00:00
Jan Bouwhuis 839e2881e0
Fix mqtt reconfigure does not use broker entry password when it is not changed (#137169) 2025-02-02 16:21:40 +01:00
epenet d0a188b86d
Standardize homeassistant imports in component tests (m-z) (#136807) 2025-01-29 08:57:57 +01:00
Jan Bouwhuis f0257fec88
Fix mqtt number state validation (#135621) 2025-01-15 10:13:27 +01:00
Jan Bouwhuis b93aa760c5
Refactor the MQTT option and reconfigure flow (#133342)
* Move entry options to entry.options en remove broker setup from mqtt option flow

* UPdate diagnostics to export both entry data and options

* Parameterize entry options directly not depending on migration

* Update tests to use v2 entry and add separate migration test

* use start_reconfigure_flow helper

* Update quality scale comment

* Do minor entry upgrade, and do not force to upgrade entry

* Ensure options are read from older entries

* Add comment

* Follow up on code review

* Assert config entry version checking the broker connection

* Update comment
2025-01-13 19:00:18 +01:00
Jan Bouwhuis eba090c9ef
Allow to process kelvin as color_temp for mqtt template light (#133957) 2025-01-10 11:43:36 +01:00
epenet 02956f9a83
Improve formatting in component test files (#135267)
Improve formatting in test files
2025-01-10 10:53:45 +01:00
Jan Bouwhuis cabdae98e8
Allow to process kelvin as color_temp for mqtt json light (#133955) 2025-01-09 18:34:42 +01:00
Jan Bouwhuis ec37e1ff8d
Allow to process kelvin as color_temp for mqtt basic light (#133953) 2025-01-09 16:31:09 +01:00
Jan Bouwhuis 85c94e6403
Calculate number of discovery topics correctly (#134393) 2025-01-01 16:55:41 +01:00
Jan Bouwhuis 8098122dfe
Ensure an entity platform is added in mqtt tests (#134331) 2024-12-31 23:01:55 +01:00
Jan Bouwhuis 7b2a5d0684
Remove mqtt publish templates after 6 months of deprecation (#134056) 2024-12-26 23:25:44 +01:00
Jan Bouwhuis 6b666b3a0f
Test color_temp updates are processed when an mqtt json light is turned off (#133715) 2024-12-21 12:44:00 +01:00
J. Nick Koston 4e316429d3
Handle WebsocketConnectionError during mqtt auto reconnect (#133697)
followup to #133610 to handle the exception in the auto reconnect
path as well

fixes #132985
2024-12-21 11:18:47 +01:00
J. Nick Koston 551a584ca6
Handle mqtt.WebsocketConnectionError when connecting to the MQTT broker (#133610)
fixes #132985
2024-12-19 21:39:39 +01:00
Jan Bouwhuis ac6d718094
Fix mqtt reconfigure flow (#133315)
* FIx mqtt reconfigure flow

* Follow up on code review
2024-12-17 09:37:46 +01:00
Jan Bouwhuis 2003fc7ae0
Adjust MQTT tests not to assert on deprecated color_temp attribute (#133198) 2024-12-15 19:42:54 +01:00
Jan Bouwhuis 16ad2d52c7
Improve MQTT json color_temp validation (#133174)
* Improve MQTT json color_temp validation

* Revert unrelated changes and assert on logs

* Typo
2024-12-15 13:07:10 +01:00
Jan Bouwhuis 73cb3fa88d
Fix lingering mqtt device_trigger unload entry test (#133202) 2024-12-15 11:55:33 +01:00
Jan Bouwhuis 97da8481d2
Add reconfigure flow to MQTT (#132246)
* Add reconfigure flow for MQTT integration

* Add test and translation strings

* Update quality scale configuration

* Do not cache ConfigEntry in flow

* Make sorce condition explictit

* Rework from suggested changes

* Do not allow reconfigure_entry and reconfigure_entry_data to be `None`
2024-12-13 16:11:45 +01:00
epenet 2ce2765e67
Adjust light test helpers to use Kelvin, and cleanup unused helpers (#133048)
Cleanup light test helper methods
2024-12-12 16:49:25 +01:00
epenet 33c799b2d0
Migrate mqtt light tests to use Kelvin (#133035) 2024-12-12 16:42:10 +01:00
epenet 0d71828def
Migrate mqtt lights to use Kelvin (#132828)
* Migrate mqtt lights to use Kelvin

* Adjust restore_cache tests

* Adjust tests
2024-12-11 16:11:14 +01:00
G Johansson 2eaf206562
Implement new state property for vacuum which is using an enum (#126353)
* Implement new state property for vacuum which is using an enum

* Mod

* Mod init

* Mods

* Fix integrations

* Tests

* Fix state

* Add vacuum tests

* Fix last test

* Litterrobot tests

* Fixes

* Tests

* Fixes

* Fix VacuumEntity

* Mods

* Mods

* Mods

* Update demo

* LG

* Fix vacuum

* Fix Matter

* Fix deprecation version

* Mods

* Fixes

* Fix ruff

* Fix tests

* Fix roomba

* Fix breaking dates
2024-12-06 11:16:03 +01:00
Jan Bouwhuis 8f43a71ff6
Ensure MQTT subscriptions can be made when the broker is disconnected (#132270) 2024-12-04 15:18:04 +01:00
Jan Bouwhuis a6cb6fd239
Create MQTT device referenced by via device (#131588) 2024-11-27 18:12:46 +01:00
Jan Bouwhuis 3474642afe
Set up MQTT websocket_api and dump, publish actions from `async_setup` (#131170)
* Set up MQTT websocket_api and dump, publish actions from `async_setup`

* Follow up comments
2024-11-21 17:29:59 +01:00
Petar Petrov c68cadad7a
Improve precision of HSV color conversion (#130880) 2024-11-19 22:06:57 +01:00
Erik Montnemery 4ac35d40cd
Fix create flow logic for single config entry integrations (#129807)
* Fix create flow logic for single config entry integrations

* Adjust MQTT test
2024-11-04 15:45:29 +01:00
Jan Bouwhuis 9fbd484dfe
Add progress support to MQTT update platform (#129468)
* Add progress support to MQTT update platform and add validation on state updates

* Clean up cast to type class

* Add support for display_precision attribute
2024-10-30 17:22:55 +01:00
Jan Bouwhuis 1773f2aadc
Allow MQTT device based auto discovery (#118757)
* Allow MQTT device based auto discovery

* Fix merge error

* Remove unused import

* Fix discovery device based topics

* Fix cannot delete twice

* Improve cleanup test

* Follow up comment

* Typo

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

* Explain more

* Use tuple

* Default a device payload to have priority over a platform based payload

* Add unique_id to sensor test data

* Set migration flag to mark a discovery topic for migration

* Correct type hint

* Make unique_id required for components in device based discovery payload

* Remove CONF_MIGRATE_DISCOVERY from platform schema

* Unload discovered MQTT item to allow migration

* Follow up comments from code review

* ruff

* Subscribe to platform discovery wildcards first

* Use normal dict

* Use dict to persist wildcard subscription order

* Remove missed unused parameter

* Add a comment to explain we use a dict  to preserve the subscription order

* Add wildcard subscription order test

* Remove discovery flag from test

* Improve discovery migration origin logging

* Assert initial  wildcard discovery topics subscription order and after reconnect

* Improve log messages

---------

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2024-10-30 17:10:15 +01:00
Jan Bouwhuis 4e7397dc9d
Test discovery subscriptions not done when discovery is disabled (#129458)
Test discovery subscriptions not performend when discovery is disabled
2024-10-30 14:38:44 +01:00
Robert Resch 380974eed4
Remove hassio from ALLOWED_USED_COMPONENTS and move some functions to helper (#127228)
* Remove hassio from ALLOWED_USED_COMPONENTS

* Move HassioServiceInfo to helpers.service_info

* Deprecate moved functions

* Add note about deprecation

* Fix tests

* Implement suggestion

* Typo

* Update pyproject.toml

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>

---------

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
2024-10-30 12:43:41 +01:00
Mike Degatano 673f0224c9
Continue migration of methods from handler to aiohasupervisor (#129183) 2024-10-29 14:33:21 +01:00
Jan Bouwhuis d237180a98
Allow re-discovery of mqtt integration config payloads (#127362) 2024-10-26 07:21:52 +02:00
Jan Bouwhuis 4b63829eef
Allow to set `entity picture` on mqtt entity platforms (#128404) 2024-10-25 20:16:11 +02:00
G Johansson cdfec7ebb4
Implement new state property for alarm_control_panel which is using an enum (#126283)
* Alarm state from enum

* Fixes

* Set final

* Fix rebase

* Test const

* Fix breaking version

* Fix other for alarm_control_panel

* Fix integrations

* More

* More

* More

* More

* Fix zha

* Replace _attr_state

* Fix alarm_control_panel

* Fix tests

* Fixes

* Mods

* Change some

* More

* More

* More

* Tests

* Last tests

* Return enum

* Fix zha

* Remove not needed check

* Fix wording

* Fix homekit

* Mod prometheus

* Fix mypy

* Fix homekit

* Fix ifttt
2024-10-21 22:54:27 +02:00
Mike Degatano ad55c9cc19
Remaining addon management to aiohasupervisor (#128484)
* Move set addon options to aiohasupervisor

* addon stats to aiohasupervisor and test fixes

* addon changelogs to aiohasupervisor

* Raise correct error for library in tests

* Cache client in instance property

* Use singleton method rather then HassIO instance method

* Mock supervisor client in more tests
2024-10-21 16:41:00 +02:00
Jan Bouwhuis ac6d893758
Correct type hints on MQTT tests (#128299) 2024-10-16 13:49:18 +02:00
Jan Bouwhuis 3112682923
Mark mqtt as integration with single config entry (#128202) 2024-10-12 19:55:39 +02:00
G Johansson 666e8e133e
Cover state is enum (#127144)
* Change light state to use enum

* Adjust cover tests

* Update cover

* Fix covers

* Some tests

* More tests

* Fix tests

* Fix
2024-10-08 18:39:04 +02:00
Jan Bouwhuis e54031e318
Improve mqtt sensor options validion logging (#127631)
* Improve mqtt sensor options validion logging

* Fix test
2024-10-05 13:31:42 +02:00