2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.draytonwiser.internal.handler;
15 import static org.openhab.binding.draytonwiser.internal.DraytonWiserBindingConstants.PROP_SERIAL_NUMBER;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.openhab.binding.draytonwiser.internal.model.DeviceDTO;
24 * @author Andrew Schofield - Initial contribution
25 * @author Hilbrand Bouwkamp - Put all device property setting in a separate class
28 public final class DraytonWiserPropertyHelper {
30 private DraytonWiserPropertyHelper() {
34 public static void setPropertiesWithSerialNumber(final DeviceDTO device, final Map<String, Object> properties) {
35 properties.put(PROP_SERIAL_NUMBER, device.getSerialNumber());
36 setGeneralDeviceProperties(device, properties);
39 public static void setGeneralDeviceProperties(final DeviceDTO device,
40 final Map<String, ? super String> properties) {
41 properties.put("Device Type", device.getProductIdentifier());
42 properties.put("Firmware Version", device.getActiveFirmwareVersion());
43 properties.put("Manufacturer", device.getManufacturer());
44 properties.put("Model", device.getModelIdentifier());