1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Disable pylint warning for callable classes

This commit is contained in:
Oliver van Porten
2015-11-21 17:57:15 +01:00
parent 427944cc44
commit 715abf241e
3 changed files with 9 additions and 7 deletions

View File

@@ -46,11 +46,11 @@ class MqttSensor(Entity):
self._state_topic = state_topic
self._qos = qos
self._unit_of_measurement = unit_of_measurement
self._parser = mqtt.FmtParser(state_format)
self._parse = mqtt.FmtParser(state_format)
def message_received(topic, payload, qos):
""" A new MQTT message has been received. """
self._state = self._parser(payload)
self._state = self._parse(payload)
self.update_ha_state()
mqtt.subscribe(hass, self._state_topic, message_received, self._qos)