Clarify MQTT camera documentation (#22130)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Erik Montnemery 2022-03-23 08:45:48 +01:00 committed by GitHub
parent 6a6eda3015
commit 778c824ceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ ha_iot_class: Configurable
ha_domain: mqtt
---
The `mqtt` camera platform allows you to integrate the content of an image file sent through MQTT into Home Assistant as a camera. Every time a message under the `topic` in the configuration is received, the image displayed in Home Assistant will also be updated.
The `mqtt` camera platform allows you to integrate the content of an image file sent through MQTT into Home Assistant as a camera. Every time a message under the `topic` in the configuration is received, the image displayed in Home Assistant will also be updated. Messages received on `topic` should contain the full contents of an image file, for example, a JPEG image, without any additional encoding or metadata.
This can be used with an application or a service capable of sending images through MQTT.
@ -23,6 +23,12 @@ camera:
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 <mqtt_broker> -t zanzito/shared_locations/my-device -f <camera_imaga.jpg>
```
{% configuration %}
availability:
description: A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic`.