Commit Graph

491 Commits (67b035463255921a2450b70367ce702ffbb5a184)

Author SHA1 Message Date
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
Jan Bouwhuis 17588c39a4
Move manual configuration of MQTT binary_sensor to the integration key (#72183)
Add binary_sensor

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 16:14:24 +02:00
Jan Bouwhuis 3918059033
Move manual configuration of MQTT button to the integration key (#72167)
Add button

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-21 09:54:51 +02:00
Jan Bouwhuis 654b095498
Move manual configuration of MQTT alarm control panel to the integration key (#72165)
Add alarm_control_panel
2022-05-20 08:37:53 +02:00
Jan Bouwhuis ed1c2ea2b8
Move manual configuration of MQTT fan and light to the integration key (#71676)
* Processing yaml config through entry setup

* Setup all platforms

* Update homeassistant/components/mqtt/__init__.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* adjust mock_mqtt - reference config from cache

* Fix test config entry override

* Add tests yaml setup

* additional tests

* Introduce PLATFORM_SCHEMA_MODERN

* recover temporary MQTT_BASE_PLATFORM_SCHEMA

* Allow extra key in light base schema, restore test

* Fix test for exception on platform key

* One deprecation message per platform

* Remove deprecation checks from modern schema

* Update homeassistant/components/mqtt/fan.py

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

* Update homeassistant/components/mqtt/fan.py

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

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

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

* Update homeassistant/components/mqtt/light/__init__.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 homeassistant/components/mqtt/mixins.py

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

* rename validate_modern_schema

* Do not fail platform if a single config is broken

* Update homeassistant/components/mqtt/__init__.py

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

* Fix tests on asserting log

* Update log. Make helper transparant, remove patch

* Perform parallel processing

* Update tests/components/mqtt/test_init.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Apply suggestions from code review

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/mqtt/mixins.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* black

* Fix tests and add #new_format anchor

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-05-19 15:04:53 +02:00
TheHolyRoger 0fcdca2d71
Add optional base64 decoding of mqtt camera image (#71223)
Add unittest for b64 decoding of camera, fix linting
2022-05-09 21:40:15 +02:00
epenet 141688e210
Cleanup ServiceInfo compatibility (#60540)
Co-authored-by: epenet <epenet@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-05-09 14:17:48 +02:00
Jan Bouwhuis 5d9dc8252b
Use helper for testing an event change (#71579) 2022-05-09 11:52:08 +02:00
epenet 1be2438ef6
Use climate enums in mqtt (#70696) 2022-05-09 08:15:11 +02:00
Erik Montnemery e9abfad361
Reject MQTT topics which include control- or non-characters (#71263) 2022-05-03 12:19:43 -07:00
epenet a8a7359c6f
Use VacuumEntityFeature in mqtt (#70570)
* Use VacuumEntityFeature in mqtt

* Fix tests
2022-04-25 11:34:06 +02:00
Erik Montnemery 5e50a8abd5
Mark device triggers from hidden or auxiliary entities as secondary (#70335)
* Mark device triggers from hidden or auxiliary entities as secondary

* Update tests
2022-04-21 08:01:32 +02:00
Franck Nijhof bfc82b030f
Replace Climate CURRENT_HVAC_* constants with HVACAction enum (#70319) 2022-04-20 13:41:05 -07:00
Franck Nijhof a22f36178f
Replace Climate HVAC_MODE_* constants with HVACMode enum (#70286)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-04-20 13:20:53 +02:00
Franck Nijhof 1e4aacaeb1
Replace Alarm Control Panel FORMAT_ constants with CodeFormat enum (#69861) 2022-04-18 19:37:32 +02:00
Erik Montnemery 9b21a48048
Mend incorrectly imported MQTT config entries (#68987)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2022-04-01 08:11:31 -07:00
Erik Montnemery 7e8d52e5a3
Fix race when handling rapid succession of MQTT discovery messages (#68785)
Co-authored-by: jbouwh <jan@jbsoft.nl>
2022-03-29 20:26:11 -07:00
Paulus Schoutsen 69fcce3b2c
Remove energy usage from the switch base class (#68821)
* Remove energy usage from the switch base class

* Remove unused attributes from integrations
2022-03-28 18:56:04 -10:00
Jan Bouwhuis 5afe8fd2db
Revert "Add MQTT notify platform (#64728)" (#68505)
This reverts commit e574a3ef1d.
2022-03-22 12:51:24 +01:00
J. Nick Koston 723dcbafca
Complete fan speed transition from #59781 (#67743) 2022-03-09 10:38:12 +01:00
Jan Bouwhuis e574a3ef1d
Add MQTT notify platform (#64728)
* Mqtt Notify service draft

* fix updates

* Remove TARGET config parameter

* do not use protected attributes

* complete tests

* device support for auto discovery

* Add targets attribute and support for data param

* Add tests and resolve naming issues

* CONF_COMMAND_TEMPLATE from .const

* Use mqtt as default service name

* make sure service  has a unique name

* pylint error

* fix type error

* Conditional device removal and test

* Improve tests

* update description has_notify_services()

* Use TypedDict for service config

* casting- fix discovery - hass.data

* cleanup

* move MqttNotificationConfig after the schemas

* fix has_notify_services

* do not test log for reg update

* Improve casting types

* Simplify obtaining the device_id

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

* await not needed

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

* Improve casting types and naming

* cleanup_device_registry signature change and black

* remove not needed condition

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2022-03-08 16:27:18 +01:00
Jan Bouwhuis 98adeb6070
Fix false positive MQTT climate deprecation warnings for defaults (#67661)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-03-07 15:38:33 +01:00
Jan Bouwhuis 5ab4b5d15a
MQTT Improve warning override deprecated settings (#67609) 2022-03-04 12:39:29 +01:00
Jan Bouwhuis 9356bf1a8e
Fix MQTT config flow with advanced parameters (#67556)
* Fix MQTT config flow with advanced parameters

* Add test
2022-03-03 21:40:15 +01:00
Jan Bouwhuis a97fe7aae0
Mqtt fix issue with displaying non UTF-8 payload (#67471)
* Mqtt fix issue with displaying non UTF-8 payload

* None or binary

* Casting and additional test

* casting
2022-03-02 17:01:47 +01:00
Erik Montnemery 5e4b16c69a
Remove custom WS command for removing MQTT devices (#67381)
* Remove custom WS command for removing MQTT devices

* Re-add removed test
2022-02-28 15:50:49 +01:00
Erik Montnemery c7d59bb272
Fix race when unsubscribing from MQTT topics (#67376)
* Fix race when unsubscribing from MQTT topics

* Improve test
2022-02-28 14:19:50 +01:00
Jan Bouwhuis 8dbb184ed5
Add MQTT publish ACK timeout test (#67062) 2022-02-23 12:30:13 +01:00
Jan Bouwhuis 845bf80e72
Mqtt improve test coverage (#66279)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-23 12:29:32 +01:00