Search in sources :

Example 6 with Event

use of org.eclipse.smarthome.core.events.Event in project smarthome by eclipse.

the class FirmwareUpdateServiceTest method testBackgroundTransfer.

@Test
public void testBackgroundTransfer() throws Exception {
    Map<String, String> props = new HashMap<>();
    props.put(Thing.PROPERTY_FIRMWARE_VERSION, V111);
    Thing thing4 = ThingBuilder.create(THING_TYPE_UID3, THING4_ID).withProperties(props).build();
    FirmwareUpdateBackgroundTransferHandler handler4 = mock(FirmwareUpdateBackgroundTransferHandler.class);
    when(handler4.getThing()).thenReturn(thing4);
    doAnswer(invocation -> {
        return updateExecutable.get();
    }).when(handler4).isUpdateExecutable();
    doAnswer(invocation -> {
        Firmware firmware = (Firmware) invocation.getArguments()[0];
        thing4.setProperty(Thing.PROPERTY_FIRMWARE_VERSION, firmware.getVersion());
        updateExecutable.set(false);
        return null;
    }).when(handler4).updateFirmware(any(Firmware.class), any(ProgressCallback.class));
    firmwareUpdateService.addFirmwareUpdateHandler(handler4);
    doAnswer(invocation -> {
        try {
            Thread.sleep(25);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        updateExecutable.set(true);
        return null;
    }).when(handler4).transferFirmware(any(Firmware.class));
    assertThat(firmwareUpdateService.getFirmwareStatusInfo(THING4_UID), is(unknownInfo));
    ArgumentCaptor<Event> eventCaptor = ArgumentCaptor.forClass(Event.class);
    verify(mockPublisher, times(1)).post(eventCaptor.capture());
    assertFirmwareStatusInfoEvent(THING4_UID, eventCaptor.getAllValues().get(eventCaptor.getAllValues().size() - 1), unknownInfo);
    FirmwareProvider firmwareProvider2 = mock(FirmwareProvider.class);
    when(firmwareProvider2.getFirmware(eq(FW120_EN.getUID()), any(Locale.class))).thenReturn(FW120_EN);
    when(firmwareProvider2.getFirmwares(any(ThingTypeUID.class), any(Locale.class))).thenAnswer(invocation -> {
        ThingTypeUID thingTypeUID = (ThingTypeUID) invocation.getArguments()[0];
        if (THING_TYPE_UID3.equals(thingTypeUID)) {
            return Collections.singleton(FW120_EN);
        } else {
            return Collections.emptySet();
        }
    });
    firmwareRegistry.addFirmwareProvider(firmwareProvider2);
    assertThat(firmwareUpdateService.getFirmwareStatusInfo(THING4_UID), is(updateAvailableInfo));
    verify(mockPublisher, times(2)).post(eventCaptor.capture());
    assertFirmwareStatusInfoEvent(THING4_UID, eventCaptor.getAllValues().get(eventCaptor.getAllValues().size() - 1), updateAvailableInfo);
    waitForAssert(() -> {
        assertThat(firmwareUpdateService.getFirmwareStatusInfo(THING4_UID), is(updateExecutableInfoFw120));
        verify(mockPublisher, times(3)).post(eventCaptor.capture());
        assertFirmwareStatusInfoEvent(THING4_UID, eventCaptor.getAllValues().get(eventCaptor.getAllValues().size() - 1), updateExecutableInfoFw120);
    });
    firmwareUpdateService.updateFirmware(THING4_UID, FW120_EN.getUID(), null);
    waitForAssert(() -> {
        assertThat(thing4.getProperties().get(Thing.PROPERTY_FIRMWARE_VERSION), is(V120));
    });
    assertThat(firmwareUpdateService.getFirmwareStatusInfo(THING4_UID), is(upToDateInfo));
    verify(mockPublisher, times(4)).post(eventCaptor.capture());
    assertFirmwareStatusInfoEvent(THING4_UID, eventCaptor.getAllValues().get(eventCaptor.getAllValues().size() - 1), upToDateInfo);
    assertThat(handler4.isUpdateExecutable(), is(false));
}
Also used : Locale(java.util.Locale) FirmwareUpdateBackgroundTransferHandler(org.eclipse.smarthome.core.thing.binding.firmware.FirmwareUpdateBackgroundTransferHandler) HashMap(java.util.HashMap) ProgressCallback(org.eclipse.smarthome.core.thing.binding.firmware.ProgressCallback) Event(org.eclipse.smarthome.core.events.Event) ThingTypeUID(org.eclipse.smarthome.core.thing.ThingTypeUID) Firmware(org.eclipse.smarthome.core.thing.binding.firmware.Firmware) Thing(org.eclipse.smarthome.core.thing.Thing) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) Test(org.junit.Test)

Example 7 with Event

use of org.eclipse.smarthome.core.events.Event in project smarthome by eclipse.

the class ThingRegistryOSGiTest method assertThatThingRegistryEventSubscribersReceiveEventsAboutThingChanges.

@Test
public void assertThatThingRegistryEventSubscribersReceiveEventsAboutThingChanges() {
    EventSubscriber thingRegistryEventSubscriber = new EventSubscriber() {

        @Override
        public Set<String> getSubscribedEventTypes() {
            Set<String> types = new HashSet<>();
            types.add(ThingAddedEvent.TYPE);
            types.add(ThingRemovedEvent.TYPE);
            types.add(ThingUpdatedEvent.TYPE);
            return types;
        }

        @Override
        public EventFilter getEventFilter() {
            return null;
        }

        @Override
        public void receive(Event event) {
            receivedEvent = event;
        }
    };
    registerService(thingRegistryEventSubscriber);
    // add new thing
    managedThingProvider.add(THING);
    waitForAssert(() -> {
        assertThat(receivedEvent, notNullValue());
    });
    assertThat(receivedEvent, is(instanceOf(ThingAddedEvent.class)));
    receivedEvent = null;
    // update thing
    Thing updatedThing = ThingBuilder.create(THING_TYPE_UID, THING_UID).build();
    managedThingProvider.update(updatedThing);
    waitForAssert(() -> {
        assertThat(receivedEvent, notNullValue());
    });
    assertThat(receivedEvent, is(instanceOf(ThingUpdatedEvent.class)));
    receivedEvent = null;
    // remove thing
    managedThingProvider.remove(THING.getUID());
    waitForAssert(() -> {
        assertThat(receivedEvent, notNullValue());
    });
    assertThat(receivedEvent, is(instanceOf(ThingRemovedEvent.class)));
    receivedEvent = null;
}
Also used : EventSubscriber(org.eclipse.smarthome.core.events.EventSubscriber) ThingUpdatedEvent(org.eclipse.smarthome.core.thing.events.ThingUpdatedEvent) ThingRemovedEvent(org.eclipse.smarthome.core.thing.events.ThingRemovedEvent) ThingAddedEvent(org.eclipse.smarthome.core.thing.events.ThingAddedEvent) Event(org.eclipse.smarthome.core.events.Event) Thing(org.eclipse.smarthome.core.thing.Thing) HashSet(java.util.HashSet) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) Test(org.junit.Test)

Example 8 with Event

use of org.eclipse.smarthome.core.events.Event in project smarthome by eclipse.

the class GroupItemTest method assertThatGroupItemChangesRespectGroupFunctionORwithUNDEF.

@Test
public void assertThatGroupItemChangesRespectGroupFunctionORwithUNDEF() throws InterruptedException {
    events.clear();
    GroupItem groupItem = new GroupItem("root", new SwitchItem("mySwitch"), new ArithmeticGroupFunction.Or(OnOffType.ON, OnOffType.OFF));
    groupItem.setItemStateConverter(itemStateConverter);
    SwitchItem sw1 = new SwitchItem("switch1");
    SwitchItem sw2 = new SwitchItem("switch2");
    groupItem.addMember(sw1);
    groupItem.addMember(sw2);
    groupItem.setEventPublisher(publisher);
    // State changes -> one change event is fired
    sw1.setState(OnOffType.ON);
    waitForAssert(() -> assertThat(events.size(), is(1)));
    List<Event> changes = events.stream().filter(it -> it instanceof GroupItemStateChangedEvent).collect(Collectors.toList());
    assertThat(changes.size(), is(1));
    GroupItemStateChangedEvent change = (GroupItemStateChangedEvent) changes.get(0);
    assertTrue(change.getItemName().equals(groupItem.getName()));
    assertTrue(change.getOldItemState().equals(UnDefType.NULL));
    assertTrue(change.getItemState().equals(OnOffType.ON));
    events.clear();
    sw2.setState(OnOffType.ON);
    sw2.setState(UnDefType.UNDEF);
    // wait to see that the event doesn't fire
    Thread.sleep(WAIT_EVENT_TO_BE_HANDLED);
    assertThat(events.size(), is(0));
    assertTrue(groupItem.getState().equals(OnOffType.ON));
}
Also used : SwitchItem(org.eclipse.smarthome.core.library.items.SwitchItem) CoreMatchers(org.hamcrest.CoreMatchers) MockitoAnnotations.initMocks(org.mockito.MockitoAnnotations.initMocks) RollershutterItem(org.eclipse.smarthome.core.library.items.RollershutterItem) NumberItem(org.eclipse.smarthome.core.library.items.NumberItem) Mock(org.mockito.Mock) OnOffType(org.eclipse.smarthome.core.library.types.OnOffType) UnDefType(org.eclipse.smarthome.core.types.UnDefType) EventFilter(org.eclipse.smarthome.core.events.EventFilter) EventSubscriber(org.eclipse.smarthome.core.events.EventSubscriber) GroupFunctionDTO(org.eclipse.smarthome.core.items.dto.GroupFunctionDTO) GroupFunctionHelper(org.eclipse.smarthome.core.internal.items.GroupFunctionHelper) HashSet(java.util.HashSet) ColorItem(org.eclipse.smarthome.core.library.items.ColorItem) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) Temperature(javax.measure.quantity.Temperature) Quantity(javax.measure.Quantity) Pressure(javax.measure.quantity.Pressure) ItemStateConverterImpl(org.eclipse.smarthome.core.internal.items.ItemStateConverterImpl) QuantityType(org.eclipse.smarthome.core.library.types.QuantityType) CoreItemFactory(org.eclipse.smarthome.core.library.CoreItemFactory) StringType(org.eclipse.smarthome.core.library.types.StringType) LinkedList(java.util.LinkedList) State(org.eclipse.smarthome.core.types.State) Dimensionless(javax.measure.quantity.Dimensionless) Before(org.junit.Before) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) RefreshType(org.eclipse.smarthome.core.types.RefreshType) Set(java.util.Set) EventPublisher(org.eclipse.smarthome.core.events.EventPublisher) ItemUpdatedEvent(org.eclipse.smarthome.core.items.events.ItemUpdatedEvent) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) DecimalType(org.eclipse.smarthome.core.library.types.DecimalType) Collectors(java.util.stream.Collectors) RawType(org.eclipse.smarthome.core.library.types.RawType) IsCollectionWithSize.hasSize(org.hamcrest.collection.IsCollectionWithSize.hasSize) List(java.util.List) HSBType(org.eclipse.smarthome.core.library.types.HSBType) Ignore(org.junit.Ignore) PercentType(org.eclipse.smarthome.core.library.types.PercentType) Units(tec.uom.se.unit.Units) ArithmeticGroupFunction(org.eclipse.smarthome.core.library.types.ArithmeticGroupFunction) UnitProvider(org.eclipse.smarthome.core.i18n.UnitProvider) DimmerItem(org.eclipse.smarthome.core.library.items.DimmerItem) Assert(org.junit.Assert) Event(org.eclipse.smarthome.core.events.Event) Collections(java.util.Collections) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) ItemUpdatedEvent(org.eclipse.smarthome.core.items.events.ItemUpdatedEvent) Event(org.eclipse.smarthome.core.events.Event) SwitchItem(org.eclipse.smarthome.core.library.items.SwitchItem) ArithmeticGroupFunction(org.eclipse.smarthome.core.library.types.ArithmeticGroupFunction) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) Test(org.junit.Test)

Example 9 with Event

use of org.eclipse.smarthome.core.events.Event in project smarthome by eclipse.

the class GroupItemTest method assertThatGroupItemChangesRespectGroupFunctionOR.

@Test
public void assertThatGroupItemChangesRespectGroupFunctionOR() {
    events.clear();
    GroupItem groupItem = new GroupItem("root", new SwitchItem("mySwitch"), new ArithmeticGroupFunction.Or(OnOffType.ON, OnOffType.OFF));
    groupItem.setItemStateConverter(itemStateConverter);
    SwitchItem sw1 = new SwitchItem("switch1");
    SwitchItem sw2 = new SwitchItem("switch2");
    groupItem.addMember(sw1);
    groupItem.addMember(sw2);
    groupItem.setEventPublisher(publisher);
    // State changes -> one change event is fired
    sw1.setState(OnOffType.ON);
    waitForAssert(() -> assertThat(events.size(), is(1)));
    List<Event> changes = events.stream().filter(it -> it instanceof GroupItemStateChangedEvent).collect(Collectors.toList());
    assertThat(changes.size(), is(1));
    GroupItemStateChangedEvent change = (GroupItemStateChangedEvent) changes.get(0);
    assertTrue(change.getItemName().equals(groupItem.getName()));
    assertTrue(change.getOldItemState().equals(UnDefType.NULL));
    assertTrue(change.getItemState().equals(OnOffType.ON));
    assertTrue(groupItem.getState().equals(OnOffType.ON));
}
Also used : SwitchItem(org.eclipse.smarthome.core.library.items.SwitchItem) CoreMatchers(org.hamcrest.CoreMatchers) MockitoAnnotations.initMocks(org.mockito.MockitoAnnotations.initMocks) RollershutterItem(org.eclipse.smarthome.core.library.items.RollershutterItem) NumberItem(org.eclipse.smarthome.core.library.items.NumberItem) Mock(org.mockito.Mock) OnOffType(org.eclipse.smarthome.core.library.types.OnOffType) UnDefType(org.eclipse.smarthome.core.types.UnDefType) EventFilter(org.eclipse.smarthome.core.events.EventFilter) EventSubscriber(org.eclipse.smarthome.core.events.EventSubscriber) GroupFunctionDTO(org.eclipse.smarthome.core.items.dto.GroupFunctionDTO) GroupFunctionHelper(org.eclipse.smarthome.core.internal.items.GroupFunctionHelper) HashSet(java.util.HashSet) ColorItem(org.eclipse.smarthome.core.library.items.ColorItem) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) Temperature(javax.measure.quantity.Temperature) Quantity(javax.measure.Quantity) Pressure(javax.measure.quantity.Pressure) ItemStateConverterImpl(org.eclipse.smarthome.core.internal.items.ItemStateConverterImpl) QuantityType(org.eclipse.smarthome.core.library.types.QuantityType) CoreItemFactory(org.eclipse.smarthome.core.library.CoreItemFactory) StringType(org.eclipse.smarthome.core.library.types.StringType) LinkedList(java.util.LinkedList) State(org.eclipse.smarthome.core.types.State) Dimensionless(javax.measure.quantity.Dimensionless) Before(org.junit.Before) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) RefreshType(org.eclipse.smarthome.core.types.RefreshType) Set(java.util.Set) EventPublisher(org.eclipse.smarthome.core.events.EventPublisher) ItemUpdatedEvent(org.eclipse.smarthome.core.items.events.ItemUpdatedEvent) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) DecimalType(org.eclipse.smarthome.core.library.types.DecimalType) Collectors(java.util.stream.Collectors) RawType(org.eclipse.smarthome.core.library.types.RawType) IsCollectionWithSize.hasSize(org.hamcrest.collection.IsCollectionWithSize.hasSize) List(java.util.List) HSBType(org.eclipse.smarthome.core.library.types.HSBType) Ignore(org.junit.Ignore) PercentType(org.eclipse.smarthome.core.library.types.PercentType) Units(tec.uom.se.unit.Units) ArithmeticGroupFunction(org.eclipse.smarthome.core.library.types.ArithmeticGroupFunction) UnitProvider(org.eclipse.smarthome.core.i18n.UnitProvider) DimmerItem(org.eclipse.smarthome.core.library.items.DimmerItem) Assert(org.junit.Assert) Event(org.eclipse.smarthome.core.events.Event) Collections(java.util.Collections) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) ItemUpdatedEvent(org.eclipse.smarthome.core.items.events.ItemUpdatedEvent) Event(org.eclipse.smarthome.core.events.Event) SwitchItem(org.eclipse.smarthome.core.library.items.SwitchItem) ArithmeticGroupFunction(org.eclipse.smarthome.core.library.types.ArithmeticGroupFunction) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) Test(org.junit.Test)

Example 10 with Event

use of org.eclipse.smarthome.core.events.Event in project smarthome by eclipse.

the class GroupItemTest method assertThatGroupItemChangesRespectGroupFunctionAND.

@Test
public void assertThatGroupItemChangesRespectGroupFunctionAND() {
    events.clear();
    GroupItem groupItem = new GroupItem("root", new SwitchItem("mySwitch"), new ArithmeticGroupFunction.And(OnOffType.ON, OnOffType.OFF));
    groupItem.setItemStateConverter(itemStateConverter);
    SwitchItem sw1 = new SwitchItem("switch1");
    SwitchItem sw2 = new SwitchItem("switch2");
    groupItem.addMember(sw1);
    groupItem.addMember(sw2);
    groupItem.setEventPublisher(publisher);
    // State changes -> one change event is fired
    sw1.setState(OnOffType.ON);
    waitForAssert(() -> assertThat(events.size(), is(1)));
    List<Event> changes = events.stream().filter(it -> it instanceof GroupItemStateChangedEvent).collect(Collectors.toList());
    assertThat(changes.size(), is(1));
    GroupItemStateChangedEvent change = (GroupItemStateChangedEvent) changes.get(0);
    assertTrue(change.getItemName().equals(groupItem.getName()));
    // we expect that the group should now have status "OFF"
    assertTrue(change.getOldItemState().equals(UnDefType.NULL));
    assertTrue(change.getItemState().equals(OnOffType.OFF));
    events.clear();
    // State changes -> one change event is fired
    sw2.setState(OnOffType.ON);
    waitForAssert(() -> assertThat(events.size(), is(1)));
    changes = events.stream().filter(it -> it instanceof GroupItemStateChangedEvent).collect(Collectors.toList());
    assertThat(changes.size(), is(1));
    change = (GroupItemStateChangedEvent) changes.get(0);
    assertTrue(change.getItemName().equals(groupItem.getName()));
    // we expect that the group should now have status "ON"
    assertTrue(change.getOldItemState().equals(OnOffType.OFF));
    assertTrue(change.getItemState().equals(OnOffType.ON));
    assertTrue(groupItem.getState().equals(OnOffType.ON));
}
Also used : SwitchItem(org.eclipse.smarthome.core.library.items.SwitchItem) CoreMatchers(org.hamcrest.CoreMatchers) MockitoAnnotations.initMocks(org.mockito.MockitoAnnotations.initMocks) RollershutterItem(org.eclipse.smarthome.core.library.items.RollershutterItem) NumberItem(org.eclipse.smarthome.core.library.items.NumberItem) Mock(org.mockito.Mock) OnOffType(org.eclipse.smarthome.core.library.types.OnOffType) UnDefType(org.eclipse.smarthome.core.types.UnDefType) EventFilter(org.eclipse.smarthome.core.events.EventFilter) EventSubscriber(org.eclipse.smarthome.core.events.EventSubscriber) GroupFunctionDTO(org.eclipse.smarthome.core.items.dto.GroupFunctionDTO) GroupFunctionHelper(org.eclipse.smarthome.core.internal.items.GroupFunctionHelper) HashSet(java.util.HashSet) ColorItem(org.eclipse.smarthome.core.library.items.ColorItem) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) Temperature(javax.measure.quantity.Temperature) Quantity(javax.measure.Quantity) Pressure(javax.measure.quantity.Pressure) ItemStateConverterImpl(org.eclipse.smarthome.core.internal.items.ItemStateConverterImpl) QuantityType(org.eclipse.smarthome.core.library.types.QuantityType) CoreItemFactory(org.eclipse.smarthome.core.library.CoreItemFactory) StringType(org.eclipse.smarthome.core.library.types.StringType) LinkedList(java.util.LinkedList) State(org.eclipse.smarthome.core.types.State) Dimensionless(javax.measure.quantity.Dimensionless) Before(org.junit.Before) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) RefreshType(org.eclipse.smarthome.core.types.RefreshType) Set(java.util.Set) EventPublisher(org.eclipse.smarthome.core.events.EventPublisher) ItemUpdatedEvent(org.eclipse.smarthome.core.items.events.ItemUpdatedEvent) Test(org.junit.Test) Mockito.when(org.mockito.Mockito.when) DecimalType(org.eclipse.smarthome.core.library.types.DecimalType) Collectors(java.util.stream.Collectors) RawType(org.eclipse.smarthome.core.library.types.RawType) IsCollectionWithSize.hasSize(org.hamcrest.collection.IsCollectionWithSize.hasSize) List(java.util.List) HSBType(org.eclipse.smarthome.core.library.types.HSBType) Ignore(org.junit.Ignore) PercentType(org.eclipse.smarthome.core.library.types.PercentType) Units(tec.uom.se.unit.Units) ArithmeticGroupFunction(org.eclipse.smarthome.core.library.types.ArithmeticGroupFunction) UnitProvider(org.eclipse.smarthome.core.i18n.UnitProvider) DimmerItem(org.eclipse.smarthome.core.library.items.DimmerItem) Assert(org.junit.Assert) Event(org.eclipse.smarthome.core.events.Event) Collections(java.util.Collections) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) GroupItemStateChangedEvent(org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent) ItemUpdatedEvent(org.eclipse.smarthome.core.items.events.ItemUpdatedEvent) Event(org.eclipse.smarthome.core.events.Event) SwitchItem(org.eclipse.smarthome.core.library.items.SwitchItem) ArithmeticGroupFunction(org.eclipse.smarthome.core.library.types.ArithmeticGroupFunction) JavaOSGiTest(org.eclipse.smarthome.test.java.JavaOSGiTest) Test(org.junit.Test)

Aggregations

Event (org.eclipse.smarthome.core.events.Event)30 JavaOSGiTest (org.eclipse.smarthome.test.java.JavaOSGiTest)19 Test (org.junit.Test)19 EventSubscriber (org.eclipse.smarthome.core.events.EventSubscriber)15 EventPublisher (org.eclipse.smarthome.core.events.EventPublisher)14 Set (java.util.Set)13 EventFilter (org.eclipse.smarthome.core.events.EventFilter)13 LinkedList (java.util.LinkedList)11 Collections (java.util.Collections)9 HashSet (java.util.HashSet)9 List (java.util.List)8 Collectors (java.util.stream.Collectors)8 Ignore (org.junit.Ignore)8 GroupFunctionHelper (org.eclipse.smarthome.core.internal.items.GroupFunctionHelper)7 ItemStateConverterImpl (org.eclipse.smarthome.core.internal.items.ItemStateConverterImpl)7 GroupItemStateChangedEvent (org.eclipse.smarthome.core.items.events.GroupItemStateChangedEvent)7 ItemUpdatedEvent (org.eclipse.smarthome.core.items.events.ItemUpdatedEvent)7 SwitchItem (org.eclipse.smarthome.core.library.items.SwitchItem)7 OnOffType (org.eclipse.smarthome.core.library.types.OnOffType)7 StringType (org.eclipse.smarthome.core.library.types.StringType)7