device.addValue(new DeviceValue("channel", String.valueOf(channel), "", "", device.getUuid(), true));
device.addValue(new DeviceValue("type", "switch", "", "", device.getUuid(), false));
} else {
device.setInternalType("sensor");
device.addValue(new DeviceValue("channel", String.valueOf(channel), "", "", device.getUuid(), true));
device.addValue(new DeviceValue("type", "sensor", "", "", device.getUuid(), false));
device.addValue(new DeviceValue("sensorname", sensor.name(), "", "", device.getUuid(), false));