* Enable autodiscovery for mqtt cameras, BREAKING CHANGE: homogenisation topic->state_topic
* fix line too long
* fix topic->state_topic in test
* image shall not be the state of entity
* phue -> aiohue
* Clean up
* Fix config
* Address comments
* Typo
* Fix rebase error
* Mark light as unavailable when bridge is disconnected
* Tests
* Make Throttle work with double delay and async
* Rework update logic
* Don't resolve host to IP
* Clarify comment
* No longer do unnecessary updates
* Add more doc
* Another comment update
* Wrap up tests
* Lint
* Fix tests
* PyLint does not like mix 'n match async and coroutine
* Lint
* Update aiohue to 1.2
* Lint
* Fix await MagicMock
* MQTT Typing
* Tiny style change
* Fixes
I should've probably really sticked to limiting myself to static typing...
* Small fix 😩
Ok, this seriously shouldn't have happened.
* 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
* Lazy loading of service descriptions
* Fix tests
* Load YAML in executor
* Return a copy of available services to allow mutations
* Remove lint
* Add zha/services.yaml
* Only cache descriptions for known services
* Remove lint
* Remove description loading during service registration
* Remove description parameter from async_register
* Test async_get_all_descriptions
* Remove lint
* Fix typos from multi-edit
* Remove unused arguments
* Remove unused import os
* Remove unused import os, part 2
* Remove unneeded coroutine decorator
* Only use executor for loading files
* Cleanups suggested in review
* Increase test coverage
* Fix races in existing tests
This applies what was the intended fix in #8336.
moves the fallback for setting client_id to the case when no mqtt config was provided at all. This should reflect the most common use case that fails.
This commit is a workaround and should be reverted when hbmqtt is fixed to allow empty client_id again.
* 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
* Automation: initial state > restore state
* Clean up code
* Ensure MQTT defaults are used.
* Ensure failed platforms always return None
* Automation: write state to state machine after start
* 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
* Add effect support to MQTT Light
* Use effect state topic for supported_features
* Dont use rainbow as default color
* Add color_temp support to MQTT JSON Light
* Add effect to MQTT JSON light
* Support lights in MQTT discovery
* Allow discovered devices to set their platform
* Add white value support to MQTT Light
* Add white value support to MQTT JSON Light
* Remove blank line
* Add color_temp support to MQTT Template light
* Add white value support to MQTT Template Light
* Remove unused SUPPORT_MQTT_TEMPLATE and stale unused flash and transition code from MQTT Template
* Add XY Color to MQTT Light Platform
* Fix syntax
* Fix more syntax errors
* Revert "Remove unused SUPPORT_MQTT_TEMPLATE and stale unused flash and transition code from MQTT Template"
This reverts commit c03798cb63.
* MQTT Template supports flash and transition but doesnt allow templating of the values
* Add XY color support to MQTT JSON
* Proper variable names
* Only allow whitelisted MQTT platforms to be loaded via MQTT Discovery
* Minor tweaks.
* 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