diff --git a/lib/openhab/core/types/date_time_type.rb b/lib/openhab/core/types/date_time_type.rb index 391abe5d8..17efe4f98 100644 --- a/lib/openhab/core/types/date_time_type.rb +++ b/lib/openhab/core/types/date_time_type.rb @@ -18,7 +18,13 @@ class DateTimeType remove_method :== extend Forwardable - include Comparable + + # @deprecated OH 4.2 DateTimeType implements Java's Comparable interface in openHAB 4.3 + if OpenHAB::Core.version >= OpenHAB::Core::V4_3 + include ComparableType + else + include Comparable + end # # Regex expression to identify strings defining a time in hours, minutes and optionally seconds