mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[ahawastecollection] Fix typo in channel id lightweight (#19833)
* Fix typo leightweight -> lightweight Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ public class AhaWasteCollectionBindingConstants {
|
||||
|
||||
// List of all Channel ids
|
||||
public static final String GENERAL_WASTE = "generalWaste";
|
||||
public static final String LEIGHTWEIGHT_PACKAGING = "leightweightPackaging";
|
||||
public static final String LIGHTWEIGHT_PACKAGING = "lightweightPackaging";
|
||||
public static final String BIOWASTE = "bioWaste";
|
||||
public static final String PAPER = "paper";
|
||||
}
|
||||
|
||||
+1
-1
@@ -194,7 +194,7 @@ public class AhaWasteCollectionHandler extends BaseThingHandler {
|
||||
switch (channelId) {
|
||||
case AhaWasteCollectionBindingConstants.BIOWASTE:
|
||||
return WasteType.BIO_WASTE;
|
||||
case AhaWasteCollectionBindingConstants.LEIGHTWEIGHT_PACKAGING:
|
||||
case AhaWasteCollectionBindingConstants.LIGHTWEIGHT_PACKAGING:
|
||||
return WasteType.LIGHT_PACKAGES;
|
||||
case AhaWasteCollectionBindingConstants.PAPER:
|
||||
return WasteType.PAPER;
|
||||
|
||||
+3
-3
@@ -29,9 +29,9 @@ channel-type.ahawastecollection.collectionDateBioWaste.state.pattern = %1$tF
|
||||
channel-type.ahawastecollection.collectionDateGeneralWaste.label = General Waste
|
||||
channel-type.ahawastecollection.collectionDateGeneralWaste.description = Next collection day for general waste
|
||||
channel-type.ahawastecollection.collectionDateGeneralWaste.state.pattern = %1$tF
|
||||
channel-type.ahawastecollection.collectionDateLeightweightPackaging.label = Leightweight Packaging
|
||||
channel-type.ahawastecollection.collectionDateLeightweightPackaging.description = Next collection day for leightweight packaging
|
||||
channel-type.ahawastecollection.collectionDateLeightweightPackaging.state.pattern = %1$tF
|
||||
channel-type.ahawastecollection.collectionDateLightweightPackaging.label = Lightweight Packaging
|
||||
channel-type.ahawastecollection.collectionDateLightweightPackaging.description = Next collection day for lightweight packaging
|
||||
channel-type.ahawastecollection.collectionDateLightweightPackaging.state.pattern = %1$tF
|
||||
channel-type.ahawastecollection.collectionDatePaper.label = Paper
|
||||
channel-type.ahawastecollection.collectionDatePaper.description = Next collection day for paper
|
||||
channel-type.ahawastecollection.collectionDatePaper.state.pattern = %1$tF
|
||||
|
||||
+8
-4
@@ -11,11 +11,15 @@
|
||||
|
||||
<channels>
|
||||
<channel id="generalWaste" typeId="collectionDateGeneralWaste"/>
|
||||
<channel id="leightweightPackaging" typeId="collectionDateLeightweightPackaging"/>
|
||||
<channel id="lightweightPackaging" typeId="collectionDateLightweightPackaging"/>
|
||||
<channel id="bioWaste" typeId="collectionDateBioWaste"/>
|
||||
<channel id="paper" typeId="collectionDatePaper"/>
|
||||
</channels>
|
||||
|
||||
<properties>
|
||||
<property name="thingTypeVersion">1</property>
|
||||
</properties>
|
||||
|
||||
<config-description>
|
||||
<parameter name="commune" type="text" required="true">
|
||||
<label>Commune</label>
|
||||
@@ -53,10 +57,10 @@
|
||||
</tags>
|
||||
<state readOnly="true" pattern="%1$tF"/>
|
||||
</channel-type>
|
||||
<channel-type id="collectionDateLeightweightPackaging">
|
||||
<channel-type id="collectionDateLightweightPackaging">
|
||||
<item-type>DateTime</item-type>
|
||||
<label>Leightweight Packaging</label>
|
||||
<description>Next collection day for leightweight packaging</description>
|
||||
<label>Lightweight Packaging</label>
|
||||
<description>Next collection day for lightweight packaging</description>
|
||||
<tags>
|
||||
<tag>Status</tag>
|
||||
<tag>Timestamp</tag>
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0"
|
||||
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd">
|
||||
|
||||
<thing-type uid="ahawastecollection:collectionSchedule">
|
||||
<instruction-set targetVersion="1">
|
||||
<remove-channel id="leightweightPackaging"/>
|
||||
<add-channel id="lightweightPackaging">
|
||||
<typeId>ahawastecollection:collectionDateLightweightPackaging</typeId>
|
||||
</add-channel>
|
||||
</instruction-set>
|
||||
</thing-type>
|
||||
|
||||
</update:update-descriptions>
|
||||
+2
-2
@@ -29,7 +29,7 @@ import org.openhab.binding.ahawastecollection.internal.CollectionDate.WasteType;
|
||||
public final class AhaCollectionScheduleStub implements AhaCollectionSchedule {
|
||||
|
||||
public static final Date GENERAL_WASTE_DATE = new GregorianCalendar(2021, 2, 19).getTime();
|
||||
public static final Date LEIGHTWEIGHT_PACKAGING_DATE = new GregorianCalendar(2021, 2, 20).getTime();
|
||||
public static final Date LIGHTWEIGHT_PACKAGING_DATE = new GregorianCalendar(2021, 2, 20).getTime();
|
||||
public static final Date BIO_WASTE_DATE = new GregorianCalendar(2021, 2, 21).getTime();
|
||||
public static final Date PAPER_DATE = new GregorianCalendar(2021, 2, 22).getTime();
|
||||
|
||||
@@ -39,7 +39,7 @@ public final class AhaCollectionScheduleStub implements AhaCollectionSchedule {
|
||||
result.put(WasteType.GENERAL_WASTE,
|
||||
new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(GENERAL_WASTE_DATE)));
|
||||
result.put(WasteType.LIGHT_PACKAGES,
|
||||
new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(LEIGHTWEIGHT_PACKAGING_DATE)));
|
||||
new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(LIGHTWEIGHT_PACKAGING_DATE)));
|
||||
result.put(WasteType.BIO_WASTE, new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(BIO_WASTE_DATE)));
|
||||
result.put(WasteType.PAPER, new CollectionDate(WasteType.GENERAL_WASTE, Arrays.asList(PAPER_DATE)));
|
||||
return result;
|
||||
|
||||
+3
-3
@@ -111,7 +111,7 @@ public class AhaWasteCollectionHandlerTest {
|
||||
AhaWasteCollectionBindingConstants.GENERAL_WASTE);
|
||||
final Channel channelPaper = mockChannel(thing.getUID(), AhaWasteCollectionBindingConstants.PAPER);
|
||||
final Channel channelLightweightPackaging = mockChannel(thing.getUID(),
|
||||
AhaWasteCollectionBindingConstants.LEIGHTWEIGHT_PACKAGING);
|
||||
AhaWasteCollectionBindingConstants.LIGHTWEIGHT_PACKAGING);
|
||||
|
||||
when(thing.getChannels()).thenReturn(
|
||||
Arrays.asList(channelBioWaste, channelGeneralWaste, channelLightweightPackaging, channelPaper));
|
||||
@@ -159,8 +159,8 @@ public class AhaWasteCollectionHandlerTest {
|
||||
new ChannelUID(thing.getUID(), AhaWasteCollectionBindingConstants.GENERAL_WASTE),
|
||||
getDateTime(AhaCollectionScheduleStub.GENERAL_WASTE_DATE));
|
||||
verify(callback).stateUpdated(
|
||||
new ChannelUID(thing.getUID(), AhaWasteCollectionBindingConstants.LEIGHTWEIGHT_PACKAGING),
|
||||
getDateTime(AhaCollectionScheduleStub.LEIGHTWEIGHT_PACKAGING_DATE));
|
||||
new ChannelUID(thing.getUID(), AhaWasteCollectionBindingConstants.LIGHTWEIGHT_PACKAGING),
|
||||
getDateTime(AhaCollectionScheduleStub.LIGHTWEIGHT_PACKAGING_DATE));
|
||||
verify(callback).stateUpdated(new ChannelUID(thing.getUID(), AhaWasteCollectionBindingConstants.PAPER),
|
||||
getDateTime(AhaCollectionScheduleStub.PAPER_DATE));
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user