Skip to content

Commit

Permalink
[http] Use core channel updates (#553)
Browse files Browse the repository at this point in the history
Signed-off-by: Jan N. Klug <[email protected]>
  • Loading branch information
J-N-K committed Jan 1, 2024
1 parent cd6f4fc commit dcc33b9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
import org.openhab.core.thing.ThingStatusDetail;
import org.openhab.core.thing.binding.BaseThingHandler;
import org.openhab.core.thing.binding.generic.ChannelHandler;
import org.openhab.core.thing.binding.generic.ChannelHandlerContent;
import org.openhab.core.thing.binding.generic.ChannelMode;
Expand Down Expand Up @@ -73,7 +74,6 @@
import org.smarthomej.binding.http.internal.http.RateLimitedHttpClient;
import org.smarthomej.binding.http.internal.http.RefreshingUrlCache;
import org.smarthomej.commons.SimpleDynamicStateDescriptionProvider;
import org.smarthomej.commons.UpdatingBaseThingHandler;

/**
* The {@link HttpThingHandler} is responsible for handling commands, which are
Expand All @@ -82,7 +82,7 @@
* @author Jan N. Klug - Initial contribution
*/
@NonNullByDefault
public class HttpThingHandler extends UpdatingBaseThingHandler implements HttpStatusListener {
public class HttpThingHandler extends BaseThingHandler implements HttpStatusListener {
private static final Set<Character> URL_PART_DELIMITER = Set.of('/', '?', '&');

private final Logger logger = LoggerFactory.getLogger(HttpThingHandler.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?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="http:url">
<instruction-set targetVersion="1">
<add-channel id="lastSuccess">
<type>http:requestDateTime</type>
<label>Last Success</label>
</add-channel>
<add-channel id="lastFailure">
<type>http:requestDateTime</type>
<label>Last Failure</label>
</add-channel>
</instruction-set>
</thing-type>

</update:update-descriptions>

This file was deleted.

0 comments on commit dcc33b9

Please sign in to comment.