Commit graph

58 commits

Author SHA1 Message Date
Jan Bouwhuis
aab7dffdb9
Only expose MQTT advanced settings in advanced mode (#91996) 2023-04-25 22:23:17 +02:00
Jan Bouwhuis
aa68d1d617
Cleanup mqtt CONFIG_SCHEMA_ENTRY (#90791) 2023-04-11 17:41:38 +02:00
Jan Bouwhuis
14ffda9758
Remove dependency on async_setup from mqtt integration (#87987)
* Remove async_setup from mqtt integration

* Final update common tests

* Related tests init

* Related tests diagnostics

* Related tests config_flow

* Cleanup and correct test

* Keep websockets_api commands in async_setup
2023-03-28 09:37:07 +02:00
Jan Bouwhuis
57738fbb8c
Replace deprecated SSLContext constant PROTOCOL_TLS in mqtt (#88214)
Replace deprecated SSLContext constants
2023-02-16 13:01:28 -05:00
epenet
ba23816a0c
Inverse json import logic (#88099)
* Fix helpers and util

* Adjust components

* Move back errors

* Add report

* mypy

* mypy

* Assert deprecation messages

* Move test_json_loads_object

* Adjust tests

* Fix rebase

* Adjust pylint plugin

* Fix plugin

* Adjust references

* Adjust backup tests
2023-02-16 11:37:57 +01:00
Franck Nijhof
b7de185924
Fix CI, missing import in MQTT (#86517) 2023-01-24 11:40:40 +01:00
Jan Bouwhuis
42ca46d7b2
Remove redundant label for MQTT CA verification selector (#86236)
Remove redundant label for MQTT CA verification
2023-01-24 09:38:00 +01:00
Marc Mueller
077ca97ef8
Fix local_partial_types errors (#86410)
Fix local_partial_types errors
2023-01-23 10:29:11 +01:00
Jan Bouwhuis
66c3115b26
Improve MQTT transport select label (#86216) 2023-01-22 22:12:06 +01:00
Jan Bouwhuis
25392655e7
Allow translating select selector options (#85531)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2023-01-17 16:22:19 +01:00
Franck Nijhof
800b8abe39
Code styling tweaks to the MQTT integration (#85463) 2023-01-08 22:07:10 +01:00
Jan Bouwhuis
32d68f375b
Add Mqtt WebSockets support (#82078)
* Add Mqtt WebSockets support

* Fix tests

* Add testing websockets options

* Add tests transport settings

* Do not use templates for ws_headers

* Use json helper - small corrections
2022-11-23 15:03:31 +01:00
Jan Bouwhuis
b717da879f
Add support for Mqtt protocol version 5 (#82260) 2022-11-17 21:12:27 +01:00
Aarni Koskela
bbda122c99
Fix mqtt typo (#82086)
mqtt: fix "certiticate" typo
2022-11-14 16:22:23 +01:00
Jan Bouwhuis
7500d0c61c
Refactor MQTT_WILL_BIRTH_SCHEMA (#81879)
* Refactor MQTT_WILL_BIRTH_SCHEMA

* Refactor and move birth/will validation to utils

* Simplify birth will validation
2022-11-10 15:24:56 +01:00
Jan Bouwhuis
2d9f39d406
Strict typing for shared MQTT modules (#80913)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-10-26 13:52:34 +02:00
Jan Bouwhuis
5e7f571f01
Move advanced MQTT options to entry (#79351)
* Move advanced broker settings to entry

* Add repair issue for deprecated settings

* Split CONFIG_SCHEMA

* Do not store certificate UI flags in entry

* Keep entered password in next dialog

* Do not process yaml config in flow

* Correct typo
2022-10-24 09:58:23 +02:00
Jan Bouwhuis
65187ab227
Use selectors for basic broker and options for MQTT config flow (#79791)
Use selectors for basic broker en options
2022-10-11 10:51:35 +02:00
Jan Bouwhuis
6eb2c96d32
Correct use of ConfigType in MQTT config flow code (#79934)
Correct use of ConfigType
2022-10-09 14:41:30 +02:00
Jan Bouwhuis
aee82e2b3b
De-duplicate MQTT config_flow code (#79369)
* De-duplicate config_flow code

* De duplicate code birth and will
2022-10-07 10:12:19 +02:00
Jan Bouwhuis
84b2c74746
Move MQTT discovery hass.data globals to dataclass (#78706)
* Add MQTT discovery hass.data globals to dataclass

* isort

* Additional rework

* Add hass.data["mqtt_tags"] to dataclass

* Follow-up comment

* Corrections
2022-09-28 14:13:44 +02:00
Jan Bouwhuis
c5a58c8501
Fix MQTT setup after changing config entry flow options (#79103)
Fix issues with config flow options
2022-09-27 08:05:28 +02:00
epenet
e58531f118
Add MqttData helper to mqtt (#78825)
* Add MqttData helper to mqtt

* Adjust client for circular dependencies

* Move MqttData to models.py

* Move get_mqtt_data to util.py
2022-09-20 19:40:06 +02:00
Jan Bouwhuis
1f410e884a
Make hass.data["mqtt"] an instance of a DataClass (#77972)
* Use dataclass to reference hass.data globals

* Add discovery_registry_hooks to dataclass

* Move discovery registry hooks to dataclass

* Add device triggers to dataclass

* Cleanup DEVICE_TRIGGERS const

* Add last_discovery to data_class

* Simplify typing for class `Subscription`

* Follow up on comment

* Redo suggested typing change to sasisfy mypy

* Restore typing

* Add mypy version to CI check logging

* revert changes to ci.yaml

* Add docstr for protocol

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>

* Mypy update after merging #78399

* Remove mypy ignore

* Correct return type

Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
2022-09-17 21:43:42 +02:00
epenet
8ef87205f9
Improve type hints in mqtt (#74247) 2022-06-30 21:11:45 +02:00
epenet
f846cd033f
Add async_get_options_flow type hints (mqtt) (#73434) 2022-06-13 13:35:50 +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
e5523ef6b6
Correct local import of paho-mqtt (#67944)
* Correct local import of paho-mqtt

* Remove MqttClientSetup.mqtt class attribute

* Remove reference to MqttClientSetup.mqtt
2022-03-10 10:32:49 +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
845bf80e72
Mqtt improve test coverage (#66279)
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2022-02-23 12:29:32 +01:00
Erik Montnemery
750b48dcaf
Use pylint disable-next in MQTT (#66758) 2022-02-17 11:12:12 -08:00
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
epenet
358922db56
Use dataclass for HassioServiceInfo (#60824)
Co-authored-by: epenet <epenet@users.noreply.github.com>
2021-12-03 14:05:56 +01:00
Franck Nijhof
96303a1d80
Fix MQTT add-on discovery to be ignorable (#55250) 2021-08-26 11:14:42 +02:00
Erik Montnemery
7dec23d58b
Improve translation strings for MQTT config and option flows (#50018)
Co-authored-by: Franck Nijhof <git@frenck.dev>
2021-05-05 21:25:28 -07:00
Franck Nijhof
a6206b2819
Clean up connection classes in integrations M-O (#49892) 2021-04-30 21:03:37 -10:00
Franck Nijhof
e1a3ef3d69
Clean up config entry handlers decorator from config flows (#49932) 2021-04-30 23:28:25 +02:00
Erik Montnemery
8013eb0e08
Allow data entry flows to hint for additional steps (#49202) 2021-04-23 11:02:12 -07:00
Philip Allgaier
3ae9460131
Use domain const in config_flow (#48168) 2021-03-21 00:34:46 +01:00
tkdrob
a5a45f29e2
Cleanup unused loggers (#46510) 2021-02-14 13:46:58 +01:00
tkdrob
b85ecc0bd2
Use core constants for mqtt (#46389) 2021-02-11 13:38:33 +01:00
Erik Montnemery
a50f121011
Get option flow defaults from yaml for non configured MQTT options (#40177) 2020-09-19 22:10:01 +02:00
Franck Nijhof
1c2ebdf307
Upgrade black to 20.8b1 (#39287) 2020-08-27 13:56:20 +02:00
Erik Montnemery
53d6f4948e
Adapt MQTT config flow to default birth and will (#37875) 2020-07-15 11:16:03 -07:00
Erik Montnemery
747490ab34
Support reconfiguring MQTT config entry (#36537) 2020-06-22 17:49:01 -07:00
Franck Nijhof
3cc94f7d6a
ConfigFlow default discovery without unique ID (#36754) 2020-06-15 13:38:38 +02:00
Franck Nijhof
b9b1cee403
Enable pylint import-outside-toplevel (#33631) 2020-04-04 17:07:36 +02:00
Paulus Schoutsen
ffaa0e572a
Inline MQTT paho imports (#29177)
* Inline MQTT paho imports

* Address comments

* Fix patch paths

* Move other imports inline

* Fix test
2019-12-02 11:32:02 -08:00
Malte Franken
1a5b4c105a Move imports in mqtt component (#27835)
* move imports to top-level in mqtt server

* move imports to top-level in mqtt configflow

* move imports to top-level in mqtt init

* move imports to top-level in mqtt vacuum

* move imports to top-level in mqtt light
2019-10-17 17:04:27 -07:00