diff --git a/source/_integrations/image.mqtt.markdown b/source/_integrations/image.mqtt.markdown index f2fa9c9ee6e..6d6b19c75bc 100644 --- a/source/_integrations/image.mqtt.markdown +++ b/source/_integrations/image.mqtt.markdown @@ -25,14 +25,8 @@ To enable this image in your installation, add the following to your `configurat ```yaml # Example configuration.yaml entry mqtt: - image: - - topic: zanzito/shared_locations/my-device -``` - -The sample configuration above can be tested by publishing an image to the topic from the console: - -```shell -mosquitto_pub -h -t zanzito/shared_locations/my-device -f + - image: + url_topic: mynas/status/url ``` {% configuration %} @@ -73,7 +67,7 @@ availability_topic: required: false type: string content_type: - description: The content type of and image data message received on `image_topic`. This option cannot be used with the `from_url_topic` because the content type is derived when downloading the image. + description: The content type of and image data message received on `image_topic`. This option cannot be used with the `url_topic` because the content type is derived when downloading the image. required: false type: string default: image/jpeg @@ -180,7 +174,7 @@ url_topic: type: string {% endconfiguration %} -### Example receiving images from from a URL +### Example receiving images from a URL Add the configuration below to your `configuration.yaml`. @@ -195,8 +189,30 @@ mosquitto_pub -h -t mynas/status/url -m "https://design.home-assis ```yaml # Example configuration.yaml entry mqtt: - image: - - from_url_topic: mynas/status/url + - image: + url_topic: mynas/status/url +``` + +{% endraw %} + +### Example receiving images from a file + +Add the configuration below to your `configuration.yaml`. + +To test it, publish an image URL to the topic from the console: + +```shell +mosquitto_pub -h -t mynas/status/file -f +``` + +{% raw %} + +```yaml +# Example configuration.yaml entry +mqtt: + - image: + image_topic: mynas/status/file + content_type: image/png ``` {% endraw %}