mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[epsonprojector] Incorporate review suggestions from other PRs (#16860)
Signed-off-by: Michael Lobstein <michael.lobstein@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
865b86769d
commit
0fbe6f7ca1
@ -49,7 +49,7 @@ public class EpsonProjectorDiscoveryParticipant implements SddpDiscoveryParticip
|
||||
|
||||
@Override
|
||||
public Set<ThingTypeUID> getSupportedThingTypeUIDs() {
|
||||
return SUPPORTED_THING_TYPES_UIDS;
|
||||
return Set.of(THING_TYPE_PROJECTOR_TCP);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,9 +76,10 @@ public class EpsonProjectorDiscoveryParticipant implements SddpDiscoveryParticip
|
||||
@Override
|
||||
public @Nullable ThingUID getThingUID(SddpDevice device) {
|
||||
if (device.manufacturer.toUpperCase(Locale.ENGLISH).contains(EPSON)
|
||||
&& device.type.toUpperCase(Locale.ENGLISH).contains(TYPE_PROJECTOR) && !device.macAddress.isBlank()) {
|
||||
|
||||
&& device.type.toUpperCase(Locale.ENGLISH).contains(TYPE_PROJECTOR) && !device.macAddress.isBlank()
|
||||
&& !device.ipAddress.isBlank()) {
|
||||
logger.debug("Epson projector with mac {} found at {}", device.macAddress, device.ipAddress);
|
||||
|
||||
return new ThingUID(THING_TYPE_PROJECTOR_TCP,
|
||||
device.macAddress.replaceAll("-", "").toUpperCase(Locale.ENGLISH));
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ public class EpsonProjectorDiscoveryService extends AbstractDiscoveryService {
|
||||
|
||||
@Override
|
||||
public Set<ThingTypeUID> getSupportedThingTypes() {
|
||||
return SUPPORTED_THING_TYPES_UIDS;
|
||||
return Set.of(THING_TYPE_PROJECTOR_TCP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -12,9 +12,13 @@
|
||||
<discovery-method>
|
||||
<service-type>sddp</service-type>
|
||||
<match-properties>
|
||||
<match-property>
|
||||
<name>manufacturer</name>
|
||||
<regex>(?i).*epson.*</regex>
|
||||
</match-property>
|
||||
<match-property>
|
||||
<name>type</name>
|
||||
<regex>(?i)epson:projector.*</regex>
|
||||
<regex>(?i).*projector.*</regex>
|
||||
</match-property>
|
||||
</match-properties>
|
||||
</discovery-method>
|
||||
|
@ -116,7 +116,7 @@ channel-type.epsonprojector.horizontalreverse.description = Turn the Horizontal
|
||||
channel-type.epsonprojector.keycode.label = KeyCode
|
||||
channel-type.epsonprojector.keycode.description = Send a KEY Operation Command to the Projector
|
||||
channel-type.epsonprojector.lamptime.label = Lamp Time
|
||||
channel-type.epsonprojector.lamptime.description = Retrieves the Lamp Hours
|
||||
channel-type.epsonprojector.lamptime.description = Retrieves the number of hours the lamp has been used
|
||||
channel-type.epsonprojector.luminance.label = Luminance
|
||||
channel-type.epsonprojector.luminance.description = Retrieve or Set the Lamp Mode
|
||||
channel-type.epsonprojector.luminance.state.option.NORMAL = NORMAL
|
||||
|
@ -142,7 +142,7 @@
|
||||
<channel-type id="lamptime">
|
||||
<item-type>Number</item-type>
|
||||
<label>Lamp Time</label>
|
||||
<description>Retrieves the Lamp Hours</description>
|
||||
<description>Retrieves the number of hours the lamp has been used</description>
|
||||
<state readOnly="true" pattern="%d h"/>
|
||||
</channel-type>
|
||||
<channel-type id="keycode" advanced="true">
|
||||
|
Loading…
Reference in New Issue
Block a user