]> _ Git - tortuga-home.git/commitdiff
.
authorVincent <vincent@enhydra.fr>
Wed, 5 Feb 2020 09:28:38 +0000 (10:28 +0100)
committerVincent <vincent@enhydra.fr>
Wed, 5 Feb 2020 09:28:38 +0000 (10:28 +0100)
.idea/workspace.xml
scripts/cron/cron.php

index 5a7483f952e3496d16b5f5c255c7e78fb6f17605..c347b008d12b2321602add58fbc6e8932aaa5565 100644 (file)
@@ -3,9 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/gradient.php" beforeDir="false" afterPath="$PROJECT_DIR$/gradient.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/weatherstation.css" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.css" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/style/weatherstation.less" beforeDir="false" afterPath="$PROJECT_DIR$/style/weatherstation.less" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
       <workItem from="1580459154087" duration="3479000" />
       <workItem from="1580545354824" duration="796000" />
       <workItem from="1580720992873" duration="177000" />
+      <workItem from="1580894754542" duration="92000" />
     </task>
     <task id="LOCAL-00240" summary=".">
       <created>1571906440281</created>
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1580377827629" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1580721070828">
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1580894755111">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
     <state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
     <state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1575647093028" />
-    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1580721070828" />
+    <state x="976" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1580894755111" />
     <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1580460367675">
       <screen x="0" y="0" width="2560" height="1040" />
     </state>
index 3fcef55a5167fe7c58b00f714c37e5a55e5fc3bf..12587e9c13de84b2b2fb8cf1c9f293bd4f10b6bc 100644 (file)
@@ -149,7 +149,7 @@ function toNumber($val, $round = false)
     $val = preg_replace('/[^0-9-.]/', '', $val);
     $val = floatval($val);
     if ($round) {
-        $val = round($val);
+        $val = round($val, $round === true ? 0 : $round);
     }
     return $val;
 }
@@ -168,17 +168,17 @@ function cronWeather($cronmin)
     $weather = json_decode(file_get_contents($cache), true);
     $weather = $weather[0];
     $res['temp'] = round(($weather['Temperature']['Metric']['Value']/* + getState('airtemperature')*/));
-    $res['outdoor_temp'] = toNumber(getDomoticzDeviceStatus(1030), true);
+    $res['outdoor_temp'] = toNumber(getDomoticzDeviceStatus(1030), 1);
     $res['outdoor_humidity'] = toNumber(getDomoticzDeviceStatus(1031), true);
     $res['outdoor_pressure'] = toNumber(getDomoticzDeviceStatus(1032), true);
-    $res['backyard_temp'] = toNumber(getDomoticzDeviceStatus(1025), true);
+    $res['backyard_temp'] = toNumber(getDomoticzDeviceStatus(1025), 1);
     $res['backyard_humidity'] = toNumber(getDomoticzDeviceStatus(1026), true);
     $res['backyard_pressure'] = toNumber(getDomoticzDeviceStatus(1027), true);
-    $res['bathroom_temp'] = toNumber(getDomoticzDeviceStatus(1346), true);
+    $res['bathroom_temp'] = toNumber(getDomoticzDeviceStatus(1346), 1);
     $res['bathroom_humidity'] = toNumber(getDomoticzDeviceStatus(1347), true);
-    $res['bedroom_temp'] = toNumber(getDomoticzDeviceStatus(1356), true);
+    $res['bedroom_temp'] = toNumber(getDomoticzDeviceStatus(1356), 1);
     $res['bedroom_humidity'] = toNumber(getDomoticzDeviceStatus(1357), true);
-    $res['livingroom_temp'] = toNumber(getDomoticzDeviceStatus(1351), true);
+    $res['livingroom_temp'] = toNumber(getDomoticzDeviceStatus(1351), 1);
     $res['livingroom_humidity'] = toNumber(getDomoticzDeviceStatus(1352), true);
     $res['pressure'] = round($weather['Pressure']['Metric']['Value']);
     $res['pressureTendency'] = $weather['PressureTendency']['Code'];