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
Ville Skyttä
99c7608fb4
Lint config cleanups ( #28864 )
...
* Remove bunch of unneeded lint exclusions
* Use symbolic names instead of identifiers in pylint disables
* Tighten scope of some pylint disables
2019-11-25 22:40:08 -08:00
Ville Skyttä
d88ca0f5cb
Lint exclusions ( #28655 )
...
* Remove malformed pylint disable markers
* Remove some unused imports
* Remove some unneeded lint exclusions
* Remove more unneeded lint exclusions
* Add specific codes to all noqa's
2019-11-16 10:22:07 +01:00
Erik Montnemery
643257d911
Include subscriber information when MQTT message can't be decoded ( #28062 )
2019-10-21 17:34:58 +02: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
Ville Skyttä
761d7f21e9
Upgrade pylint ( #27279 )
...
* Upgrade pylint to 2.4.2 and astroid to 2.3.1
https://pylint.readthedocs.io/en/latest/whatsnew/2.4.html
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-1
https://pylint.readthedocs.io/en/latest/whatsnew/changelog.html#what-s-new-in-pylint-2-4-2
* unnecessary-comprehension fixes
* invalid-name fixes
* self-assigning-variable fixes
* Re-enable not-an-iterable
* used-before-assignment fix
* invalid-overridden-method fixes
* undefined-variable __class__ workarounds
https://github.com/PyCQA/pylint/issues/3090
* no-member false positive disabling
* Remove some no longer needed disables
* using-constant-test fix
* Disable import-outside-toplevel for now
* Disable some apparent no-value-for-parameter false positives
* invalid-overridden-method false positive disables
https://github.com/PyCQA/pylint/issues/3150
* Fix unintentional Entity.force_update override in AfterShipSensor
2019-10-07 08:17:39 -07:00
Pascal Vizeli
c1851a2d94
Cleanup coroutine threadsafe ( #27080 )
...
* Cleanup coroutine threadsafe
* fix lint
* Fix typing
* Fix tests
* Fix black
2019-10-01 16:59:06 +02:00
Ville Skyttä
33e1b44b3a
Use PEP 526 type annotations, add some type hints ( #26464 )
...
* Add some more type hints to helpers.event
* Change most type comments to variable types
* Remove some superfluous type hints
2019-09-07 09:48:58 +03:00
Ville Skyttä
b738082dad
Type check various base components ( #25878 )
...
* Type check various component base classes, disabling bunch of checks for now
* Type hint fixes
* Help mypy out some
* Add more type hints
2019-08-11 20:38:18 -07:00
Ville Skyttä
a54ade1189
Spelling fixes ( #25666 )
2019-08-02 23:20:06 +02:00
Paulus Schoutsen
4de97abc3a
Black
2019-07-31 12:25:30 -07:00
Penny Wood
84e6813779
Rename via_hub to via_device ( #24360 )
...
* Rename via_hub to via_device
* Fixed registry interactions
2019-06-10 09:10:44 -07:00
Paulus Schoutsen
f995ab9d54
Don't pass in loop ( #23984 )
...
* Don't pass in loop
* Revert some changes
* Lint + Axis revert
* reinstate loop
* Fix a test
* Set loop
* Update camera.py
* Lint
2019-05-22 21:09:59 -07:00
Erik Montnemery
70ba5eb0ef
Add json_attributes_template ( #22981 )
2019-04-18 20:55:10 -07:00
cgtobi
2c07bfb9e0
Remove dependencies and requirements ( #23024 )
...
* Remove dependencies and requirements
* Revert "Remove dependencies and requirements"
This reverts commit fe7171b4cd
.
* Remove dependencies and requirements
* Revert "Remove dependencies and requirements"
This reverts commit 391355ee2c
.
* Remove dependencies and requirements
* Fix flake8 complaints
* Fix more flake8 complaints
* Revert non-component removals
2019-04-12 10:13:30 -07:00
Paulus Schoutsen
e48ef7f441
Fix broken platform components ( #22943 )
...
* Fix broken platform components
* Lint
2019-04-09 15:42:44 -07:00
Erik Montnemery
353fca3b6e
Raise severity of MQTT callback deprecation warning ( #22792 )
2019-04-06 20:31:39 -07:00
Erik Montnemery
563e4fbfca
Add deprecation warning to embedded broker ( #22753 )
2019-04-04 23:38:10 -07:00
Kyle Niewiada
a5a926bcc6
Raise ConfigEntryNotReady for MQTT connection exception ( #22540 )
...
* Raise ConfigEntryNotReady for connection exception
Raise ConfigEntryNotReady for the connection exception like if the MQTT Server container/device is being restarted or was unavailable on boot.
* Add new exception
* grammar fix
* Possibly resolve hound comments
* raise `ConfigEntryNotReady` for mqtt connection error
* revert exceptions.py
* Update exceptions.py
* modify test to handle exception
* use constants to control exception scope
* Raise ConfigEntryNotReady for connection exception
Raise ConfigEntryNotReady for the connection exception like if the MQTT Server container/device is being restarted or was unavailable on boot.
* Add new exception
* Add new exception
* grammar fix
* Possibly resolve hound comments
* raise `ConfigEntryNotReady` for mqtt connection error
* revert exceptions.py
* Update exceptions.py
* modify test to handle exception
* use constants to control exception scope
* revert test change as it's not the same thing
* Update test_init.py
* Add test for MQTT OSError
* revert file changes from a bad rebase
* Rewrite test with valid syntax
* rewrite test to be less ambiguous
* add empty line
* add back 'axis'
* Remove empty line
* Update tests and undo merge from earlier
* correctly restore test for no connect broker
* fix test mock correctly
* line was too long. hit enter.
2019-04-03 21:51:01 -07:00
Tobias Sauerwein
048b100eea
Clean up docstrings ( #22679 )
...
* Clean up docstrings
* Fix long lines
* Fix more docstrings
* Fix more docstrings
* Fix more docstrings
2019-04-03 17:40:03 +02:00
Paulus Schoutsen
4b1de61110
Use relative imports inside integrations ( #22235 )
...
* Use relative imports inside integrations
* Lint
* Fix automation tests
* Fix scene imports
2019-03-20 22:56:46 -07:00
emontnemery
5957e4b75b
Pass Message object to MQTT message callbacks ( #21959 )
...
* Pass Message object to MQTT message callbacks
* Improve method of detecting deprecated msg callback
* Fix mysensors
* Fixup
* Review comments
* Fix merge error
2019-03-13 12:58:20 -07:00
emontnemery
ce1fe06193
Write state directly in all MQTT platforms ( #21971 )
2019-03-12 14:46:48 -07:00
Paulus Schoutsen
429bbc05dc
Add WS subscription command for MQTT ( #21696 )
...
* Add WS subscription command for MQTT
* Add test
* Add check for connected
* Rename event_listeners to subscriptions
2019-03-10 20:07:09 -07:00
Jason Hu
fe1840f901
Deprecate http.api_password ( #21884 )
...
* Deprecated http.api_password
* Deprecated ApiConfig.api_password
GitHub Drafted PR would trigger CI after changed it to normal PR.
I have to commit a comment change to trigger it
* Trigger CI
* Adjust if- elif chain in auth middleware
2019-03-10 19:55:36 -07:00
emontnemery
b1faad0a50
Use PLATFORM_SCHEMA_BASE as base schema for additional components. ( #20578 )
...
* Disable extra=vol.ALLOW_EXTRA for additional platforms.
* Remove PLATFORM_SCHEMA_2
* Add entity_namespace to base platform schema
2019-02-04 21:52:19 -08:00
emontnemery
89fc3b2a1b
Disable extra=vol.ALLOW_EXTRA for MQTT platforms. ( #20562 )
2019-01-29 09:29:02 -08:00
emontnemery
648adcc708
Small cleanup of MQTT platforms ( #20503 )
...
* Move CONF_UNIQUE_ID to init
* Sort imports
* Update ordering
2019-01-27 18:54:52 +01:00
emontnemery
a1da6a677a
Update device registry of MQTT Switch ( #19540 )
...
* MQTT Switch: Update device registry
* Move config_entry to constructor
* Remove duplicated code
* Fix merge error
2019-01-24 22:39:16 -08:00
emontnemery
368682647d
Log exceptions thrown by MQTT message callbacks ( #19977 )
...
* Log exceptions thrown by MQTT message callbacks
* Fix tests
* Correct method for skipping wrapper in traceback
* Lint
* Simplify traceback print
* Add test
* Move wrapper to common helper function
* Typing
* Lint
2019-01-16 13:50:21 -08:00
emontnemery
0ec1401be7
Minor refactoring of MQTT availability ( #20136 )
...
* Small refactor of MQTT availability
* Use dict[key] for required config keys and keys with default values.
2019-01-15 14:26:37 -08:00
Fredrik Erlandsson
b9a488912a
Add support for 'via_hub' for device_info ( #19454 )
...
* Add support for 'via_hub'
* Update config schema
* add domain to via_hub
* add tests for via_hub
2019-01-11 13:11:13 -08:00
emontnemery
dd75c49796
Cleanup if discovered mqtt switch can't be added ( #19721 )
...
* Cleanup if discovered mqtt switch can't be added
2019-01-07 16:57:51 +01:00
emontnemery
1568de62df
Correct calls to subscription.async_unsubscribe_topics ( #19414 )
...
* Correct calls to subscription.async_unsubscribe_topics
* Review comments
* Add testcases
2018-12-19 14:05:24 +01:00
emontnemery
5ff7563070
Merge pull request #18923 from emontnemery/mqtt_binary_sensor_json_attributes_topic
...
Add JSON attribute topic to MQTT binary sensor
2018-12-07 07:48:55 +01:00
Erik
df346feb65
Review comments
2018-12-05 19:48:44 +01:00
Erik
f54710c454
Fix bug when reconfiguring MQTT availability
2018-12-04 21:25:18 +01:00
Erik
21197fb968
Review comments
2018-12-04 19:56:34 +01:00
Erik
b9ad19acbf
Add JSON attribute topic to MQTT binary sensor
...
Add MqttAttributes mixin
2018-12-02 17:00:31 +01:00
Adam Mills
5c3a4e3d10
Restore states through a JSON store instead of recorder ( #17270 )
...
* Restore states through a JSON store
* Accept entity_id directly in restore state helper
* Keep states stored between runs for a limited time
* Remove warning
2018-11-28 13:16:43 +01:00
Erik
b198bb441a
Support updated MQTT QoS when reconfiguring MQTT availability
2018-11-23 15:32:24 +01:00
emontnemery
de9bac9ee3
Reconfigure MQTT binary_sensor component if discovery info is changed ( #18169 )
...
* Recreate component if discovery info is changed
* Update component instead of remove+add
* Set name and unique_id in __init__
* Update unit test
* Cleanup
* More cleanup
* Refactor according to review comments
* Change discovery_hash
* Review comments, add tests
* Fix handling of value_template
2018-11-19 16:49:04 +01:00
Ville Skyttä
43048962f2
Upgrade flake8 to 3.6.0 ( #17770 )
...
* Upgrade flake8 to 3.6.0
* flake8/pylint comment tweaks
* flake8 F841 fixes
* flake8 W605 fix
* Ignore pyflakes bug #373 false positives
https://github.com/PyCQA/pyflakes/issues/373
* pycodestyle bug #811 workaround
https://github.com/PyCQA/pycodestyle/issues/811
2018-10-25 23:15:20 +03:00
Otto Winter
af2402ea59
Implement base for MQTT device registry integration ( #16943 )
...
* Implement base for MQTT device registry integration
* Lint
* Lint
* Address comments
* Lint
* Lint
* Address comments
* Only add keys if specified
See https://github.com/home-assistant/home-assistant/pull/17136#discussion_r223267185
2018-10-08 12:53:30 +02:00
cdce8p
7f0a50ce31
async_create_task ( #17059 )
...
* async_create_task
* Update google.py
2018-10-02 11:03:09 +02:00
Paulus Schoutsen
c69a790ede
Add Hass.io discovery to MQTT ( #16962 )
...
* Add Hass.io discovery to MQTT
* Update en.json
* Update __init__.py
* Update config_flow.py
* Update strings.json
* Update test_config_flow.py
* Lint
* Ensure we don't send bad data in config entry
2018-10-01 14:11:21 +02:00
Paulus Schoutsen
0a2b266742
Fix MQTT certificates ( #16999 )
2018-09-30 21:36:27 +02:00
Otto Winter
2d104f95d7
Fix MQTT Config Entry Discovery ( #16919 )
2018-09-27 22:56:04 +02:00
Paulus Schoutsen
c899875abb
Fix MQTT discovery ( #16864 )
...
* Fix MQTT discovery
* Update __init__.py
2018-09-26 09:38:50 +02:00
Paulus Schoutsen
e4898bb05c
Allow MQTT discovery ( #16842 )
2018-09-25 12:22:14 +02:00