Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bundles/org.openhab.automation.pythonscripting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<configuration>
<connectionUrl>scm:git:https://github.com/openhab/openhab-python</connectionUrl>
<checkoutDirectory>${project.build.directory}/python</checkoutDirectory>
<scmVersion>v1.0.0-rc1</scmVersion>
<scmVersion>v1.0.0-rc2</scmVersion>
<scmVersionType>tag</scmVersionType>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public class PythonScriptEngine
.targetTypeMapping(Value.class, Duration.class,
// picking two members to check as Duration has many common function names
v -> v.hasMember("total_seconds") && v.hasMember("total_seconds"),
v -> Duration.ofNanos(v.invokeMember("total_seconds").asLong() * 10000000),
v -> Duration.ofNanos(Math.round(v.invokeMember("total_seconds").asDouble() * 1000000000)),
HostAccess.TargetMappingPrecedence.LOW)

// Translate python item to org.openhab.core.items.Item
Expand Down