1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-07 22:29:19 +00:00

70_LaMetric2: round lifetime

git-svn-id: https://svn.fhem.de/fhem/trunk@17911 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2018-12-07 12:52:35 +00:00
parent bf27fd55d8
commit 9121dbc979

View File

@ -48,6 +48,7 @@
# - Add FHEM web frontend widgets to setters # - Add FHEM web frontend widgets to setters
#TODO #TODO
#- implement key pinning to improve security for self-signed certificate
#- rtype replace of special characters that device cannot display: #- rtype replace of special characters that device cannot display:
# 0x00A0 -> " " space # 0x00A0 -> " " space
# 0x202F -> " " space # 0x202F -> " " space
@ -300,7 +301,7 @@ sub LaMetric2_Define($$) {
$hash->{HOST} = $host; $hash->{HOST} = $host;
$hash->{".API_KEY"} = $apikey; $hash->{".API_KEY"} = $apikey;
$hash->{VERSION} = "2.0.0"; $hash->{VERSION} = "2.0.1";
$hash->{INTERVAL} = $hash->{INTERVAL} =
$interval && looks_like_number($interval) ? $interval : 60; $interval && looks_like_number($interval) ? $interval : 60;
$hash->{PORT} = $port && looks_like_number($port) ? $port : 4343; $hash->{PORT} = $port && looks_like_number($port) ? $port : 4343;
@ -1700,7 +1701,7 @@ sub LaMetric2_SetNotification {
my %notification = ( my %notification = (
priority => $values{priority}, priority => $values{priority},
icon_type => $values{icontype}, icon_type => $values{icontype},
lifetime => $values{lifetime} * 1000, lifetime => round( $values{lifetime} * 1000, 0 ),
model => { model => {
cycles => $values{cycles}, cycles => $values{cycles},
}, },
@ -2302,7 +2303,7 @@ sub LaMetric2_IsDuringTimeframe($$;$) {
</li> </li>
<li> <li>
<a name="LaMetric2AttrnotificationGoalLifetime" id="LaMetric2AttrnotificationGoalLifetime"></a><code>notificationGoalLifetime</code><br> <a name="LaMetric2AttrnotificationGoalLifetime" id="LaMetric2AttrnotificationGoalLifetime"></a><code>notificationGoalLifetime</code><br>
Fallback value for lifetype when sending goal notifications. Defaults to '120'. Fallback value for lifetime when sending goal notifications. Defaults to '120'.
</li> </li>
<li> <li>
<a name="LaMetric2AttrnotificationGoalPriority" id="LaMetric2AttrnotificationGoalPriority"></a><code>notificationGoalPriority</code><br> <a name="LaMetric2AttrnotificationGoalPriority" id="LaMetric2AttrnotificationGoalPriority"></a><code>notificationGoalPriority</code><br>
@ -2338,7 +2339,7 @@ sub LaMetric2_IsDuringTimeframe($$;$) {
</li> </li>
<li> <li>
<a name="LaMetric2AttrnotificationMetricLifetime" id="LaMetric2AttrnotificationMetricLifetime"></a><code>notificationMetricLifetime</code><br> <a name="LaMetric2AttrnotificationMetricLifetime" id="LaMetric2AttrnotificationMetricLifetime"></a><code>notificationMetricLifetime</code><br>
Fallback value for lifetype when sending metric notifications. Defaults to '120'. Fallback value for lifetime when sending metric notifications. Defaults to '120'.
</li> </li>
<li> <li>
<a name="LaMetric2AttrnotificationMetricPriority" id="LaMetric2AttrnotificationMetricPriority"></a><code>notificationMetricPriority</code><br> <a name="LaMetric2AttrnotificationMetricPriority" id="LaMetric2AttrnotificationMetricPriority"></a><code>notificationMetricPriority</code><br>