use of org.eclipse.smarthome.core.thing.ManagedThingProvider in project smarthome by eclipse.
the class TradfriHandlerTest method setUp.
@Before
public void setUp() {
registerService(volatileStorageService);
managedThingProvider = getService(ThingProvider.class, ManagedThingProvider.class);
Map<String, Object> properties = new HashMap<>();
properties.put(GATEWAY_CONFIG_HOST, "1.2.3.4");
properties.put(GATEWAY_CONFIG_IDENTITY, "identity");
properties.put(GATEWAY_CONFIG_PRE_SHARED_KEY, "pre-shared-secret-key");
bridge = BridgeBuilder.create(GATEWAY_TYPE_UID, "1").withLabel("My Gateway").withConfiguration(new Configuration(properties)).build();
properties = new HashMap<>();
properties.put(CONFIG_ID, "65537");
thing = ThingBuilder.create(THING_TYPE_DIMMABLE_LIGHT, "1").withLabel("My Bulb").withBridge(bridge.getUID()).withConfiguration(new Configuration(properties)).build();
}
Aggregations