2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 04:36:36 +00:00

use POSIX: delete this in some modules; small changes in attrTemplate files

git-svn-id: https://svn.fhem.de/fhem/trunk@21510 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2020-03-25 11:33:32 +00:00
parent 5fc51e39ad
commit 51973e144f
6 changed files with 8 additions and 5 deletions

View File

@ -27,7 +27,6 @@
package main;
use strict;
use warnings;
use POSIX;
use Time::Local 'timelocal_nocheck';

View File

@ -642,7 +642,7 @@ attr DEVICE stateFormat { my $ret ="";;\
$ret .= sprintf("%-32s",AttrVal($dev,"alias",$dev));;\
$ret .= '</b></a> | ';;\
$ret .= '<b style="color:lightgray;;">';;\
$ret .= '<a href="http://'.ReadingsVal($dev,"IPAddress",ReadingsVal($dev,"INFO1_IPAddress","0.0.0.0")).'/up" target="_blank">';;\
$ret .= '<a href="http://'.ReadingsVal($dev,"IPAddress",ReadingsVal($dev,"INFO2_IPAddress","0.0.0.0")).'/up" target="_blank">';;\
$ret .= sprintf("%7s",$old);;\
$ret .= '</a></b> | ';;\
$ret .= '<a href="https://github.com/arendst/Tasmota/releases/tag/v'.$new.'">';;\

View File

@ -1486,6 +1486,9 @@ filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.*
order:A_10b
desc:Applies to single relay Shelly devices offering energy meassuring like Shelly 1PM or Shelly Plug S
par:DEVNAME;Shelly1 name in the topic;{ AttrVal("DEVICE","readingList","") =~ m,shellies/([^/]*)/, ? $1 : undef }
par:RADIO_SETUSERREADING;Set userreading for total energy consumption;{ undef }
par:RADIO_DONOTSETUSERREADING;Do not set userreading for total energy consumption;{ undef }
par:NEWUSERREADINGS;NEWUSERREADINGS as set if relay_0_energy_total is included, otherwise it will be added;{ my $old = AttrVal("DEVICE","userReadings",undef);; !defined $old ? 'relay_0_energy_total:relay_0_energy:.* monotonic {ReadingsNum("$name","relay_0_energy",0)}' : $old =~ m,relay_0_energy_total:relay_0_energy.*, ? $old : $old.', relay_0_energy_total:relay_0_energy:.* monotonic {ReadingsNum("$name","relay_0_energy",0)}' }
attr DEVICE setList\
relay0:on,off,toggle shellies/DEVNAME/relay/0/command $EVTPART1\
off:noArg shellies/DEVNAME/relay/0/command off\
@ -1513,6 +1516,10 @@ deletereading -q DEVICE (?!associatedWith).*
set DEVICE x_mqttcom announce
set DEVICE attrTemplate speechcontrol_type_switch
attr DEVICE model shelly1_w_energy_meassuring
option:{ RADIO_SETUSERREADING }
attr DEVICE userReadings NEWUSERREADINGS
name:shelly1_w_energy_meassuring_washer_example
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*shellies.*

View File

@ -24,7 +24,6 @@
package main;
use strict;
use warnings;
use POSIX;
########################################################################
sub Heating_Control_Initialize($)
{

View File

@ -6,7 +6,6 @@ package main;
use strict;
use warnings;
use POSIX;
sub
attrTmqtt2_ebus_Utils_Initialize($$)

View File

@ -6,7 +6,6 @@ package main;
use strict;
use warnings;
use POSIX;
sub
attrTmqtt2_roborock_Utils_Initialize($$)