RECEntly, I noticed that defining the platform mqtt under the camera yaml entry has been deprecated and the camera is now under mqtt.
I had 2 such cameras. To fix this, and also to help identify yaml issues, I put all my mqtt settings in a separate yaml and included this in configuration.yaml. (NB I did also try the code just in confiuration.yaml but want to continue with having mqtt separate if possible).
Configuration.yaml:
mqtt: !include mqtt.yaml
mqtt.yaml:
discovery: true
discovery_prefix: homeassistant
broker: core-mosquitto
username: !secret mosquitto_username
password: !secret mosquitto_password
birth_message:
topic: 'hass/status'
payload: 'online'
will_message:
topic: 'hass/status'
payload: 'offline'
camera:
- topic: homeassistant/SideGate/motion/snapshot/image
name: Sidegate Motion
- topic: homeassistant/BirdCam/motion/snapshot/image
name: Birdcam Motion
This results in the following configuration error:
Invalid config for [mqtt]: [camera] is an invalid option for [mqtt]. Check: mqtt->mqtt->camera. (See /config/configuration.yaml, line 200).
The same error occurs if I have all the code in configuration.yaml.
The example I have seen is:
# Example configuration.yaml entry
mqtt:
camera:
- topic: zanzito/shared_locations/my-device
I believe mine looks the same format but have clearly misunderstood something. Can someone help please?