rossko57
(Rossko57)
November 11, 2021, 9:28am
7
Please don’t post “How do I ..” problems in the Tutorials and Examples forum section, it makes it harder for people to find the tutorials and examples with solutions.
For the most part the Python code will use the same over all approach as JavaScript. Get the state sing items and create QuantityTypes for constants (no | notation is available). For example,
var incC = items["tempItemC"] + new QuantityType("1 °C");
in JavaScript would be
incC = items["tempItemC"] + new QuantityType("1 °C")
in Python.
JavaScript
logger.info("state contains " + items["tempItemF].toString());
JavaScript
if(items["tempItemC.state"] > new QuantityType("5 °C")) {
if(items…