Commit Graph

254 Commits (7e70252de58d6dfa857eb35c1d21a599b0fc655f)

Author SHA1 Message Date
Marc Mueller 10bfc78365
Fix missing encoding with open() ()
* Fix missing encoding with open()

* Fix tests

* Improve open - frontend
2021-07-28 09:41:45 +02:00
Jan Bouwhuis c9eab10134
Add MQTT humidifier platform integration ()
* New mqtt humidifier platform

* Add humidifier platform

* Leave out humidity step

* Use humidity in constant for payload reset

* change TARGET_HUMIDITY_RESET payload name

* _attr_max_humidity not assigned correctly

* _target_humidity_range has a zero base

* align CONF_TARGET_HUMIDITY_MIN and MAX  with model

* shorter topics for humidity_range

* Converts float to int from template

* new humidifier abbreviations

* Add common module to support tests

* Add tests

* Addtional testing

* Always require target_humidity_command_topic

* Typo

* use available_modes to align entity model

* use avail_modes not modes to avoid conflict

* typo target_humidity_value_template

* Allign modes and templates with climate platform

* mode_state_template

* target_humidity_state_template

* Typo in platform name

* Remove humidity_range feature and common lib

* Update homeassistant/components/mqtt/humidifier.py

Use vol.In, not regex

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

* black

* Update homeassistant/components/mqtt/humidifier.py

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

* Use round to convert float to target humidity

Co-authored-by: Erik Montnemery <erik@montnemery.com>
2021-07-15 11:12:23 +02:00
Erik Montnemery 4d32e1ed01
Minor improvements of MQTT typing ()
* Minor improvements of MQTT typing

* Tweak
2021-07-06 14:38:48 +02:00
Erik Montnemery 79ee112490
Enable basic type checking for mqtt ()
* Enable basic type checking for mqtt

* Tweak
2021-07-05 10:33:12 +02:00
Erik Montnemery 4e5ec26ce6
Remove value_template from MQTT_RW_PLATFORM_SCHEMA () 2021-06-08 08:23:35 +02:00
Paulus Schoutsen bcd91cc2bd
Drop certificate filling in for cloudmqtt () 2021-05-26 09:31:35 -07:00
jan iversen 9410aefd0d
Integrations m*: Rename HomeAssistantType to HomeAssistant. () 2021-04-22 14:53:37 -07:00
Marc Mueller 25a13d1554
Update typing 10 () 2021-03-18 13:07:04 +01:00
Ville Skyttä dc880118a4
Lint suppression cleanups ()
* Unused pylint suppression cleanups

* Remove outdated pylint bug references

* Add flake8-noqa config and note to run it every now and then

* Add codes to noqa's

* Unused noqa cleanups
2021-03-02 09:02:04 +01:00
Erik Montnemery 190a9f66cb
Improve MQTT timeout print () 2021-02-12 11:43:44 +01:00
tkdrob b85ecc0bd2
Use core constants for mqtt () 2021-02-11 13:38:33 +01:00
tkdrob 66ecd2e0f2
Remove unused config_flows () 2021-02-08 08:32:24 +01:00
Erik Montnemery 0e068a5f39
Truncate MQTT payload in debug messages to 8kB () 2021-01-23 14:52:43 -05:00
Erik Montnemery b85efd343f
Move MQTT entity helpers to separate file ()
* Move MQTT entity helpers to separate file

* Fix imports

* Update MQTT number

* Review comments

* Fix formatting
2021-01-09 00:47:17 +01:00
Diogo Gomes f18880686c
Add MQTT Number ()
* Initial Commit

* initial commit

* add discovery and tests

* increase coverage

* address review

* catchup with reality
2021-01-06 08:27:46 +01:00
Erik Montnemery 34bd70aee6
Fix race when handling MQTT discovery messages ()
* Fix race when handling MQTT discovery messages

* Lint

* retrigger checks
2021-01-04 12:28:17 +01:00
Paulus Schoutsen 594e905742
Remove invalidation_version from deprecated ()
* Remove invalidation_version from deprecated. We don't follow up and just hurts releases

* Revert change to ZHA
2020-12-12 22:24:16 +01:00
Kiall Mac Innes 8efa9c5097
Add support for MQTT Scenes () 2020-12-02 19:42:28 +01:00
Erik Montnemery d18a33020b
Fix MQTT birth message deadlock () 2020-12-01 01:01:22 +01:00
Paulus Schoutsen 5b6d9abe2a
Await callbacks to keep cleaner stacktraces () 2020-11-27 17:48:43 +01:00
Erik Montnemery a5e5c5c7e6
Exclude disabled entities from async_entries_for_device () 2020-11-27 09:03:44 +01:00
Erik Montnemery 8ff10ad3b8
Fix MQTT threading bug () 2020-11-26 22:33:58 +01:00
Erik Montnemery 7f640c4a2e
Generate random MQTT client ID ()
* Generate random MQTT client ID

* Add comment

* Apply suggestions from code review

Co-authored-by: Franck Nijhof <git@frenck.dev>

Co-authored-by: Franck Nijhof <git@frenck.dev>
2020-11-07 16:27:09 +01:00
Paulus Schoutsen 6380ebd1eb
Fix MQTT publish from a script with templates () 2020-10-26 16:46:26 +01:00
J. Nick Koston e0df91ef9f
Update mqtt to use HassJob ()
Avoids the overhead of checking the callable type at run time
2020-10-14 22:04:48 +02:00
J. Nick Koston da2f9db62e
Fix async functions accidentally marked as callbacks () 2020-10-10 16:54:36 +02:00
Erik Montnemery 392d5c673a
Cache matching MQTT subscriptions () 2020-10-08 08:52:23 +02:00
Erik Montnemery 343e5d64b8
Add MQTT integration discovery ()
* Add MQTT integration discovery

* Add script/hassfest/mqtt.py

* Unsubscribe if config entry exists

* Add homeassistant/generated/mqtt.py

* Fix bad loop

* Improve tests

* Improve tests

* Apply suggestions from code review

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>

* Prevent initiating multiple config flows

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2020-10-07 18:30:51 +02:00
Erik Montnemery 06e9489fc7
Add Tasmota integration ()
* Add Tasmota integration

* Refactor

* Add tests, small improvements

* isort

* Attempt to fix tests failing with Python 3.8

* Revert "Attempt to fix tests failing with Python 3.8"

This reverts commit 11454f8a00136f068ea27204183fa3e62f3cd263.

* Fix tests failing with Python 3.8

* Cleanup tests

* Address review comments

* Address review comments

* Address review comments

* Use MAC address for device identification

* Bump hatasmota

* Bump hatasmota

* Apply suggestions from code review

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

* Fix indentation

* Remove preparation for device remove WS API

* Address review comments

* Remove useless try-except

* Tweak

* Improve tests

* Tweak

* Address review comments

* Correct test

* Update manifest.json

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
2020-10-06 14:51:58 +02:00
J. Nick Koston a11fd08d20
Create MQTTMatcher once per subscription instead of each message ()
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2020-09-30 17:18:43 +02:00
Erik Montnemery e7f832a82f
Add MQTT tag scanner () 2020-09-28 22:04:27 +02:00
Erik Montnemery a50f121011
Get option flow defaults from yaml for non configured MQTT options () 2020-09-19 22:10:01 +02:00
springstan a13c4d4c17
Increase TIMEOUT_ACK to 10s () 2020-09-16 08:14:11 +02:00
Erik Montnemery 0f3a2f1f29
Increase TIMEOUT_ACK to 2s () 2020-09-14 22:10:30 +02:00
Erik Montnemery 4d6e694d14
Fix discovery update of MQTT state templates () 2020-09-10 20:52:23 +02:00
J. Nick Koston 65e53b8251
Support reloading mqtt yaml configuration () 2020-09-02 20:16:21 -05:00
Franck Nijhof 1c2ebdf307
Upgrade black to 20.8b1 () 2020-08-27 13:56:20 +02:00
Erik Montnemery 114a7226d6
Wait before sending MQTT birth message ()
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
2020-08-25 16:42:24 +02:00
Erik Montnemery b1c0d8fb6c
Minor cleanup of MQTT ACK handling () 2020-08-24 17:28:07 +02:00
Erik Montnemery 3df67ff9e1
Fix race when waiting for MQTT ACK () 2020-08-24 11:13:12 +02:00
Erik Montnemery ee043d8614
Wait for broker to ACK MQTT operations ()
* Wait for broker to ACK MQTT operations

* Deduplicate new code

* Fix tests

* Improve test

* Don't hold PAHO lock when waiting for ACK

* Fix tests

* Add constant for ACK timeout
2020-08-21 17:00:13 +02:00
Erik Montnemery 4fa346278c
Enable PAHO MQTT client logging () 2020-08-11 22:54:41 +02:00
Michaël Arnauts d7d7ee6524
Use global CONF_UNIQUE_ID for mqtt ()
* Use global CONF_UNIQUE_ID for mqtt

* Update __init__.py

* Update __init__.py

* Update __init__.py

Co-authored-by: Chris Talkington <chris@talkingtontech.com>
2020-08-09 16:00:14 -05:00
Erik Montnemery 4ed1f8023b
Suppress MQTT discovery updates without changes () 2020-08-06 10:43:47 +02:00
Erik Montnemery fa0e12ffe8
Use keywords for MQTT birth and will () 2020-07-21 14:10:34 -07:00
Erik Montnemery 908b72370b
Correct arguments to MQTT will_set () 2020-07-21 12:36:21 -07:00
Erik Montnemery 53d6f4948e
Adapt MQTT config flow to default birth and will () 2020-07-15 11:16:03 -07:00
Ville Skyttä ac0dbb17af
Attrs cleanups () 2020-07-14 10:30:30 -07:00
Erik Montnemery b187b17a4f
Fix MQTT availability startup race () 2020-07-10 09:40:15 -07:00
Erik Montnemery 383db60dff
Tweak MQTT availability () 2020-07-10 09:39:18 -07:00