mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 22:11:22 +00:00
Remove disableCache. #45
This commit is contained in:
1 parent
bcbe3eb075
commit
bc4dff65ff
2 files changed
+5
-9
No files matched your search
+5
-3
@@ -235,9 +235,11 @@ class Controller {
|
||||
// - If NO payload is returned do nothing. This is for non-standard behaviour
|
||||
// for e.g. click switches where we need to count number of clicks and detect long presses.
|
||||
converters.forEach((converter) => {
|
||||
const publish = (payload) => this.mqttPublishDeviceState(
|
||||
device.ieeeAddr, payload, converter.disableCache !== true
|
||||
);
|
||||
const publish = (payload) => {
|
||||
// Don't cache messages with click and action.
|
||||
const cache = !payload.hasOwnProperty('click') && !payload.hasOwnProperty('action');
|
||||
this.mqttPublishDeviceState(device.ieeeAddr, payload, cache);
|
||||
};
|
||||
|
||||
const payload = converter.convert(message, publish, settings.getDevice(device.ieeeAddr));
|
||||
|
||||
|
||||
Reference in new issue
Block a user