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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user