* Fix light tests [skip ci]
* Fix tests/common
* Fix some mqtt tests [skip ci]
* Fix tests and component manifests which have only one platform
* Fix more tests and manifests
* Fix demo/notify tests
* Rollback test for demo.geo_location
* 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.
* Fix MQTT retained message not being re-dispatched
* Fix tests
* Use paho-mqtt for retained messages
* Improve code style
* Store list of subscribers
* Fix lint error
* Adhere to Home Assistant's logging standard
"Try to avoid brackets and additional quotes around the output to make it easier for users to parse the log."
- https://home-assistant.io/developers/development_guidelines/
* Add reconnect tests
* Fix lint error
* Introduce Subscription
Tests still need to be updated
* Use namedtuple for MQTT messages
... And fix issues
Accessing the config manually at runtime isn't ideal
* Fix MQTT __init__.py tests
* Updated usage of Mocks
* Moved tests that were testing subscriptions out of the MQTTComponent test, because of how mock.patch was used
* Adjusted the remaining tests for the MQTT clients new behavior - e.g. self.progress was removed
* Updated the async_fire_mqtt_message helper
* ✅ Update MQTT tests
* Re-introduce the MQTT subscriptions through the dispatcher for tests - quite ugly though... 🚧
* Update fixtures to use our new MQTT mock 🎨
* 📝 Update base code according to comments
* 🔨 Adjust MQTT test base
* 🔨 Update other MQTT tests
* 🍎 Fix carriage return in source files
Apparently test_mqtt_json.py and test_mqtt_template.py were written on Windows. In order to not mess up the diff, I'll just redo the carriage return.
* 🎨 Remove unused import
* 📝 Remove fire_mqtt_client_message
* 🐛 Fix using python 3.6 method
What's very interesting is that 3.4 didn't fail on travis...
* 🐛 Fix using assert directly
* Fixed mqtt subscription filter on sys $ topics
* fixed linting issue
* added unit tests for $ topics and changed fix to use re.escape
* merge upstream/dev mqtt unit tests
* Update test_init.py
* correct MQTT subscription filter
* wildcard handling (#) fixed
* wildcard handling (#) fixed
* added tests for topic subscription like +/something/#
* function names changed (line too long)
* using raw strings for regular expression
import order changed
* Managing binary payloads
Hello,
background: I wrote a HA camera component that gets the image from a binary payload. I'm testing it with Zanzito (https://play.google.com/store/apps/details?id=it.barbaro.zanzito) and it works apparently well: it gets the image and correctly displays it in the front-end.
But I had to make the changes I'm proposing here: the message was being blocked because the utf-8 decoding failed.
As far as I know, the utf-8 encoding is required for the topic, not for the payload. What I did here was try the utf-8 decoding, but even if unsuccessful, it dispatches the message anyway.
Is there anything else I'm missing?
thanks
Gianluca
* Update __init__.py
* Update __init__.py
* Update __init__.py
* git test - ignore
* Should work
* minor fixes
* updated mqtt/services.yaml
* added two tests, modified threaded subscribe
* removing polymer
* requested changes
* requested changes - minor fix
* security wrap around payload_file_path
* services.yaml updated
* removed file publishing
* minor fix
* automatically use bundled certificate if certificate-parameter is set to 'auto' and seperate this from which port is specified
* Fix travis error and long lines
* Update __init__.py
* Be able to select tls_version
* This test should always assert this value, not only in 3.6
* Disable linting on future property (py36)
* Only allow TLS 1.0, 1.1 and 1.2
* Fix line length issue
* Fix check config tests
* Allow auto as a TLS version
* Use bundled certificates if port matches mqtts
* Move import requests.certs to top, since it's used in more places
* Add happy and non-happy path tests for default certificate bundle on mqtts port
* Migrate mqtt to async
* address paulus comment / convert it complet async
* adress paulus comment / remove future
* Automation triggers should be async
* Fix MQTT async calls
* Show that event helpers are callbacks
* Fix tests
* Lint