From 944bb8474ff20f9035eabfa1be7cabd98a7d597b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 18 Nov 2016 07:09:57 +0100 Subject: [PATCH] Change validation to optional (#4400) --- homeassistant/components/mqtt/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/mqtt/__init__.py b/homeassistant/components/mqtt/__init__.py index fd8c915aca3..37fc13d9a0e 100644 --- a/homeassistant/components/mqtt/__init__.py +++ b/homeassistant/components/mqtt/__init__.py @@ -140,8 +140,8 @@ MQTT_PUBLISH_SCHEMA = vol.Schema({ vol.Required(ATTR_TOPIC): valid_publish_topic, vol.Exclusive(ATTR_PAYLOAD, CONF_PAYLOAD): object, vol.Exclusive(ATTR_PAYLOAD_TEMPLATE, CONF_PAYLOAD): cv.string, - vol.Required(ATTR_QOS, default=DEFAULT_QOS): _VALID_QOS_SCHEMA, - vol.Required(ATTR_RETAIN, default=DEFAULT_RETAIN): cv.boolean, + vol.Optional(ATTR_QOS, default=DEFAULT_QOS): _VALID_QOS_SCHEMA, + vol.Optional(ATTR_RETAIN, default=DEFAULT_RETAIN): cv.boolean, }, required=True)