]> git.basschouten.com Git - openhab-addons.git/commitdiff
Prevent exception when formatting value (#9597)
authorChristoph Weitkamp <github@christophweitkamp.de>
Wed, 30 Dec 2020 17:27:16 +0000 (18:27 +0100)
committerGitHub <noreply@github.com>
Wed, 30 Dec 2020 17:27:16 +0000 (18:27 +0100)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
bundles/org.openhab.binding.kodi/src/main/resources/OH-INF/thing/thing-types.xml

index 53a415bf6a5d62b6ce91273224072905379feb87..8f9db6734d3ebf51e19d6dbd2bfd4ee8db3498b7 100644 (file)
                <item-type>Number:Time</item-type>
                <label>Current Time</label>
                <description>Current time of currently playing media</description>
-               <state pattern="%d %unit%"/>
+               <state pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="currenttimepercentage" advanced="true">
                <item-type>Number:Dimensionless</item-type>
                <label>Current Time in Percent</label>
                <description>Current time of currently playing media</description>
-               <state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="duration">
                <item-type>Number:Time</item-type>
                <label>Duration</label>
                <description>Length of currently playing media</description>
-               <state readOnly="true" pattern="%d %unit%"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
        <channel-type id="id" advanced="true">
                <item-type>Number</item-type>