]> git.basschouten.com Git - openhab-addons.git/commitdiff
Added pattern for DateTime channel types (#11681)
authorChristoph Weitkamp <github@christophweitkamp.de>
Sat, 4 Dec 2021 13:50:13 +0000 (14:50 +0100)
committerGitHub <noreply@github.com>
Sat, 4 Dec 2021 13:50:13 +0000 (14:50 +0100)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
bundles/org.openhab.binding.logreader/src/main/resources/OH-INF/thing/channels.xml

index 4b9db8aa39768bd4e6540ba82b16910fd20739e8..6cc27f0185da08297666ccf5411235f3e44de4d1 100644 (file)
@@ -8,62 +8,60 @@
                <item-type>String</item-type>
                <label>Last Error Event</label>
                <description>Displays contents of last [ERROR] event</description>
-               <state readOnly="true"></state>
+               <state readOnly="true"/>
        </channel-type>
        <channel-type id="lastWarningEvent">
                <item-type>String</item-type>
                <label>Last Warning Event</label>
                <description>Displays contents of last [WARN] event</description>
-               <state readOnly="true"></state>
+               <state readOnly="true"/>
        </channel-type>
        <channel-type id="lastCustomEvent" advanced="true">
                <item-type>String</item-type>
                <label>Last Custom Event</label>
                <description>Displays contents of last custom event</description>
-               <state readOnly="true"></state>
+               <state readOnly="true"/>
        </channel-type>
        <channel-type id="warningEvents">
                <item-type>Number</item-type>
                <label>Warning Events Matched</label>
                <description>Displays number of [WARN] lines matched to search pattern</description>
+               <state readOnly="true"/>
        </channel-type>
        <channel-type id="errorEvents">
                <item-type>Number</item-type>
                <label>Error Events Matched</label>
                <description>Displays number of [ERROR] lines matched to search pattern</description>
+               <state readOnly="true"/>
        </channel-type>
        <channel-type id="customEvents" advanced="true">
                <item-type>Number</item-type>
                <label>Custom Events Matched</label>
                <description>Displays number of custom lines matched to search pattern</description>
+               <state readOnly="true"/>
        </channel-type>
        <channel-type id="logRotated" advanced="true">
                <item-type>DateTime</item-type>
                <label>Log Rotated</label>
                <description>Last time when log rotated recognized</description>
-               <state readOnly="true"></state>
+               <category>Time</category>
+               <state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
        </channel-type>
 
        <channel-type id="newErrorEvent">
                <kind>trigger</kind>
                <label>New Error Event</label>
                <description>Fires when a new [ERROR] appears in the log</description>
-               <event>
-               </event>
        </channel-type>
        <channel-type id="newWarningEvent">
                <kind>trigger</kind>
                <label>New Warning Event</label>
                <description>Fires when a new [WARN] appears in the log</description>
-               <event>
-               </event>
        </channel-type>
        <channel-type id="newCustomEvent" advanced="true">
                <kind>trigger</kind>
                <label>New Custom Event</label>
                <description>Fires when a new [CUSTOM] appears in the log</description>
-               <event>
-               </event>
        </channel-type>
 
 </thing:thing-descriptions>