Jan Bouwhuis
fb67123d77
Clear MQTT discovery topic when a disabled entity is removed ( #77757 )
...
* Cleanup discovery on entity removal
* Add test
* Cleanup and test
* Test with clearing payload not unique id
* Address comments
* Tests cover and typing
* Just pass hass
* reuse code
* Follow up comments revert changes to cover tests
* Add test unique_id has priority over disabled
* Update homeassistant/components/mqtt/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-09-09 15:24:26 +02:00
Jan Bouwhuis
9a4c8f5f0e
Refactor common MQTT tests to use modern schema ( #77583 )
...
* Common tests availability
* Common tests attributes
* Common tests unique id
* Common tests discovery
* Common tests encoding
* Common tests device info
* Common tests entity_id updated
* Common tests entity debug info
* Common test entity category
* Common tests setup reload unload+corrections
* Cleanup sweep
* Comments from curent change
* Cleanup
* Remove unused legacy config
2022-09-09 11:15:48 +02:00
Erik Montnemery
b21f8c9ea8
Remove use of deprecated SUPPORT_* constants from MQTT light ( #77828 )
...
* Remove use of deprecated SUPPORT_* constants from MQTT light
* Refactor
2022-09-08 11:21:46 +02:00
Jan Bouwhuis
13188a5c63
Refactor MQTT tests to use modern platform schema part 2 ( #77525 )
...
* Tests light json
* Tests light template
* Missed test light json
* Tests light
* Tests lock
* Tests number
* Tests scene
* Tests select
* Tests sensor
* Tests siren
* Tests state vacuuum
* Tests switch
* Derive DEFAULT_CONFIG_LEGACY from DEFAULT_CONFIG
* Suggested comment changes
2022-09-06 11:03:02 +02:00
Jan Bouwhuis
a4792998a2
Refactor MQTT tests to use modern platform schema part 1 ( #77387 )
...
* Tests alarm_control_panel
* Tests binary_sensor
* Tests button
* Tests camera
* Tests Climate + corrections default config
* Tests cover
* Tests device_tracker
* Tests fan
* Tests humidifier
* Fix test_supported_features test fan
* Tests init
* Tests legacy vacuum
* Derive DEFAULT_CONFIG_LEGACY from DEFAULT_CONFIG
* Commit suggestion comment changes
2022-09-06 11:02:15 +02:00
Jan Bouwhuis
a3e6abd396
Use hass.config_entries.async_setup in mqtt test ( #77750 )
...
* Use hass.config_entries.async_setup
* The setup is awaited hence waiting is not needed
2022-09-03 15:44:50 +02:00
Jan Bouwhuis
2e34814d7a
Fix reload of MQTT config entries ( #76089 )
...
* Wait for unsubscribes
* Spelling comment
* Remove notify_all() during _register_mid()
* Update homeassistant/components/mqtt/client.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* Correct handling reload manual set up MQTT items
* Save and restore device trigger subscriptions
* Clarify we are storing all remaining subscriptions
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-09-02 18:54:20 +02:00
Erik Montnemery
14717951c3
Support configuring the mode of MQTT number entities ( #77478 )
...
* Support configuring the mode of MQTT number entities
* Use modern schema for tests
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-08-30 12:47:35 +02:00
Franck Nijhof
5f0cca9b26
Raise repairs issue if automation calls unknown service ( #76949 )
2022-08-25 20:56:26 -04:00
Maciej Bieniek
ad6beac535
Add `hw_version` to MQTT device info ( #77210 )
...
* Add hw_version
* Add abbreviation for hw_version
* Update tests
* Update discovery tests
2022-08-25 11:55:33 +02:00
Erik Montnemery
c55505b47b
Use mock_restore_cache in mqtt tests ( #77297 )
2022-08-25 09:27:38 +02:00
Jan Bouwhuis
be2366d773
Add `this` object to MQTT templates ( #77142 )
...
* Add `this` object to MQTT templates
* Only set once, remove hass guard
* Set once if there is a state
* Add tests TemplateStateFromEntityId calls once
2022-08-23 08:43:07 +02:00
Erik Montnemery
60c8d95a77
Remove white_value support from light ( #76926 )
2022-08-18 08:21:05 -04:00
Erik Montnemery
4cc1428eea
Add support for color_mode white to MQTT JSON light ( #76918 )
2022-08-17 13:07:50 +02:00
Erik Montnemery
73001e29ff
Remove deprecated white_value support from MQTT light ( #76848 )
...
* Remove deprecated white_value support from MQTT light
* Remove deprecated white_value support from MQTT JSON light
* Remove deprecated white_value support from MQTT template light
2022-08-16 16:47:21 +02:00
Jan Bouwhuis
161e533c5f
Remove MQTT climate support for hold and away modes ( #76299 )
...
Remove support for hold and away modes
2022-08-15 08:27:37 +02:00
Jan Bouwhuis
f72cfef7be
Fix MQTT camera encoding ( #76124 )
...
* Fix MQTT camera encoding
* Reduce code
* Add test for using image_encoding parameter
* Move deprecation check to validation
* Dependency
* Set correct strings and log warning
* Rename constant
* Use better issue string identifier
* Revert unwanted change to hassio test
* Avoid term `deprecated` in issue description
* Revert changes using the repairs API
* Add a notice when work-a-round will be removed
* Update homeassistant/components/mqtt/camera.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-08-15 08:26:17 +02:00
Jan Bouwhuis
741efb89d5
Remove deprecated `send_if_off` option for MQTT climate ( #76293 )
...
* Remove `send_if_off` option for mqtt climate
* Use cv.remove()
2022-08-05 13:17:46 +02:00
uvjustin
9ad273a59f
Fix entity typo ( #75767 )
2022-07-26 16:27:16 +02:00
Erik Montnemery
9d0a252ca7
Improve handling of MQTT config entry data ( #72691 )
...
* Improve handling of MQTT config entry data
* Add test
* Add warning
* Adjust tests
2022-07-22 13:36:43 +02:00
Jan Bouwhuis
5ef92e5e95
Fix MQTT race awaiting an ACK when disconnecting ( #75117 )
...
Co-authored-by: Erik <erik@montnemery.com>
2022-07-20 11:58:54 +02:00
Jan Bouwhuis
5930f056a8
Mqtt support config_entry unload ( #70149 )
...
* squashed commits for rebase
* Flake
* Fix reloading issue manual legacy items
* Improve ACS sync for unsubscribe at disconnect
* Processed review comments
* Update homeassistant/components/mqtt/client.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
* No need to await entry setup
* Remove complication is_connected
* Update homeassistant/components/mqtt/__init__.py
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-07-12 11:07:18 +02:00
Franck Nijhof
7cd68381f1
Search/replace RESULT_TYPE_* by FlowResultType enum ( #74642 )
2022-07-07 19:57:36 +03:00
epenet
8ef87205f9
Improve type hints in mqtt ( #74247 )
2022-06-30 21:11:45 +02:00
J. Nick Koston
2742bf86e3
Switch mqtt to use json helper ( #73871 )
...
* Switch mqtt to use json helper
* whitespace
2022-06-23 14:29:09 +02:00
J. Nick Koston
19b2b33037
Speed up subscribing to mqtt topics on connect ( #73685 )
...
* Speed up subscribing to mqtt topics
* update tests
* Remove extra function wrapper
* Recover debug logging for subscriptions
* Small changes and test
* Update homeassistant/components/mqtt/client.py
* Update client.py
Co-authored-by: jbouwh <jan@jbsoft.nl>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-06-22 16:03:18 +02:00
Jan Bouwhuis
57daeaa174
Fix MQTT config schema to ensure correct validation ( #73619 )
...
* Ensure config schema validation
* Use correct schema for device_tracker
* Remove schema validation from the platform setup
* Remove loop to build schema
2022-06-20 08:51:12 +02:00
Erik Montnemery
dea8041461
Add device_class to MQTT number and migrate to native_value ( #73534 )
2022-06-16 13:34:54 +02:00
J. Nick Koston
51b4d15c8c
Speed up mqtt tests ( #73423 )
...
Co-authored-by: jbouwh <jan@jbsoft.nl>
Co-authored-by: Jan Bouwhuis <jbouwh@users.noreply.github.com>
2022-06-13 10:17:10 -10:00
Jan Bouwhuis
657e7f9a4c
Simplify MQTT test for setup manual mqtt item from yaml ( #72916 )
...
simplify test setup manual mqtt item from yaml
2022-06-13 13:44:12 +02:00
Jan Bouwhuis
48e3d68b53
Clean up MQTT platform entry setup at discovery ( #72371 )
...
* Setup MQTT discovery with entry setup
* Wait for entry setup in test
* flake
2022-06-13 13:38:53 +02:00
Erik Montnemery
3d78240cee
Fix initial tilt value of MQTT cover ( #73308 )
2022-06-10 11:11:40 +02:00
Erik Montnemery
b97d346df7
Fix reload of MQTT yaml config ( #72901 )
2022-06-02 11:32:31 -07:00
Jan Bouwhuis
52561ce076
Update MQTT tests to use the config entry setup ( #72373 )
...
* 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
Erik Montnemery
635d7085cf
Move MQTT config schemas and client to separate modules ( #71995 )
...
* Move MQTT config schemas and client to separate modules
* Update integrations depending on MQTT
2022-05-31 09:32:44 +02:00
Erik Montnemery
84243cf560
Tweak MQTT hassio discovery flow ( #72699 )
2022-05-30 14:25:36 +02:00
Erik Montnemery
342ccb5bf1
Improve handling of MQTT overridden settings ( #72698 )
...
* Improve handling of MQTT overridden settings
* Don't warn unless config entry overrides yaml
2022-05-30 14:21:20 +02:00
Jan Bouwhuis
d092861926
Move manual configuration of MQTT device_tracker to the integration key ( #72493 )
2022-05-26 13:02:39 -07:00
Jan Bouwhuis
d0556e6dd1
Move manual configuration of MQTT sensor to the integration key ( #72276 )
...
Add sensor
2022-05-23 16:29:45 +02:00
Jan Bouwhuis
bc6451bd64
Move manual configuration of MQTT select to the integration key ( #72274 )
...
Add select
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-23 10:08:44 +02:00
Jan Bouwhuis
673f43fbec
Move manual configuration of MQTT scene to the integration key ( #72273 )
...
Add scene
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-23 09:04:03 +02:00
Jan Bouwhuis
c4893f96f6
Move manual configuration of MQTT siren to the integration key ( #72278 )
...
Add siren
2022-05-23 08:08:08 +02:00
Jan Bouwhuis
623abb1147
Move manual configuration of MQTT number to the integration key ( #72272 )
...
Add number
2022-05-23 08:03:09 +02:00
Jan Bouwhuis
4153edbcdd
Move manual configuration of MQTT humidifier to the integration key ( #72270 )
...
Add humidifier
2022-05-22 13:07:49 +02:00
Jan Bouwhuis
3c3e394972
Move manual configuration of MQTT cover to the integration key ( #72268 )
...
Add cover
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 13:07:14 +02:00
Jan Bouwhuis
87d895929f
Move manual configuration of MQTT switch to the integration key ( #72279 )
...
Add switch
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 13:06:49 +02:00
Jan Bouwhuis
e8664ce1ae
Move manual configuration of MQTT climate to the integration key ( #72251 )
...
Add climate
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 11:28:10 +02:00
Jan Bouwhuis
d1afbbfb09
Move manual configuration of MQTT vacuum to the integration key ( #72281 )
...
Add vacuum
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-22 11:27:25 +02:00
Jan Bouwhuis
17669a728c
Move manual configuration of MQTT lock to the integration key ( #72271 )
...
Add lock
2022-05-21 19:07:26 +02:00
Jan Bouwhuis
809808dd80
Move manual configuration of MQTT camera to the integration key ( #72249 )
...
Add camera
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 19:04:36 +02:00