LOGGER.info("Channel " + channel + ": Got OFF command");
updateValue(device, "Level", "0");
DBLogger.info("Device is OFF", device.getUuid());
SensorData.log(device.getUuid(), "Switch", "OFF");
DBLogger.info("Device is DIM", device.getUuid());
SensorData.log(device.getUuid(), "Switch", "DIM");
messaging.broadcast("event.devices.noolite.value.changed", new GenericAdvertisement("DeviceDim", device.getUuid()));
LOGGER.info("Channel " + channel + ": Got ON command");
updateValue(device, "Level", "255");
DBLogger.info("Device is ON", device.getUuid());
SensorData.log(device.getUuid(), "Switch", "ON");
DBLogger.info("Device is BRIGHT", device.getUuid());
SensorData.log(device.getUuid(), "Switch", "BRIGHT");
messaging.broadcast("event.devices.noolite.value.changed", new GenericAdvertisement("DeviceBright", device.getUuid()));
LOGGER.info("Channel " + channel + ": Got SETLEVEL command.");
updateValue(device, "Level", (String) notification.getValue("level"));
DBLogger.info("Device get SETLEVEL: " + notification.getValue("level"), device.getUuid());
SensorData.log(device.getUuid(), "SetLevel", String.valueOf(notification.getValue("level")));
DBLogger.info("Device is STOPDIMBRIGHT", device.getUuid());
SensorData.log(device.getUuid(), "Switch", "STOPDIMBRIGHT");
messaging.broadcast("event.devices.noolite.value.changed", new GenericAdvertisement("DeviceStopDimBright", device.getUuid()));
BatteryState battery = (BatteryState) notification.getValue("battery");
LOGGER.info("Channel " + channel + ": Got TEMP_HUMI command.");