Add optional QoS config parameter to MQTT sensor and switch (pylint)

This commit is contained in:
sfam committed 2015-09-07 00:28:45 +00:00
1 parent c5fc5cba61
commit 0f68b9d22b
2 files changed
+6 -5

No files matched your search

+2 -1
View File
@@ -13,7 +13,7 @@ sensor:
platform: mqtt
name: "MQTT Sensor"
state_topic: "home/bedroom/temperature"
qos: 2
qos: 0
unit_of_measurement: "ºC"
Variables:
@@ -64,6 +64,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
config.get('unit_of_measurement'))])
# pylint: disable=too-many-arguments, too-many-instance-attributes
class MqttSensor(Entity):
""" Represents a sensor that can be updated using MQTT """
def __init__(self, hass, name, state_topic, qos, unit_of_measurement):