mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
mqtt2.template:fix typo in owntracks template
git-svn-id: https://svn.fhem.de/fhem/trunk@26677 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ef34ddf064
commit
a7ee2a1389
@ -4797,7 +4797,7 @@ attr DEVICE getList\
|
|||||||
attr DEVICE setList action:textField $\DEVICETOPIC/cmd {"_type":"cmd","action":$EVTPART1}\
|
attr DEVICE setList action:textField $\DEVICETOPIC/cmd {"_type":"cmd","action":$EVTPART1}\
|
||||||
config:textField $\DEVICETOPIC/cmd {"_type":"cmd","action":"setConfiguration","configuration":$EVTPART1}\
|
config:textField $\DEVICETOPIC/cmd {"_type":"cmd","action":"setConfiguration","configuration":$EVTPART1}\
|
||||||
waypoints:textField $\DEVICETOPIC/cmd {"_type":"cmd","action":"setWaypoints","waypoints":{"_type":"waypoints","waypoints":[$EVTPART1]}}\
|
waypoints:textField $\DEVICETOPIC/cmd {"_type":"cmd","action":"setWaypoints","waypoints":{"_type":"waypoints","waypoints":[$EVTPART1]}}\
|
||||||
mode:Quite,Manual,Significant,Move { my %h=(Quite=>'-1',Manual=>'0',Significant=>'1',Move=>'2');fhem("set $NAME config ".qq({"_type":"configuration","monitoring":$h{$EVTPART1}})) }\
|
mode:Quiet,Manual,Significant,Move { my %h=(Quiet=>'-1',Manual=>'0',Significant=>'1',Move=>'2');fhem("set $NAME config ".qq({"_type":"configuration","monitoring":$h{$EVTPART1}})) }\
|
||||||
x_raw_payload:textField { my $payload = $EVENT; $payload =~ s/$EVTPART0 //; qq($\DEVICETOPIC/cmd $payload) }
|
x_raw_payload:textField { my $payload = $EVENT; $payload =~ s/$EVTPART0 //; qq($\DEVICETOPIC/cmd $payload) }
|
||||||
attr DEVICE userReadings\
|
attr DEVICE userReadings\
|
||||||
location:lat.* {ReadingsNum($name,'latitude',0).','.ReadingsNum($name,'longitude',0)},\
|
location:lat.* {ReadingsNum($name,'latitude',0).','.ReadingsNum($name,'longitude',0)},\
|
||||||
|
@ -129,8 +129,8 @@ sub valetudo_c {
|
|||||||
for (keys %{$decoded}) {
|
for (keys %{$decoded}) {
|
||||||
if ( $_ eq $load ) {$ret = $devicetopic.'/GoToLocationCapability/go/set '.toJSON $decoded->{$_} }
|
if ( $_ eq $load ) {$ret = $devicetopic.'/GoToLocationCapability/go/set '.toJSON $decoded->{$_} }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# this part is for study purpose to read the full json segments with the REST API
|
# this part is for study purpose to read the full json segments with the REST API
|
||||||
# this part return an array of segment id's according to selected Names from json_segments (complex json)
|
# this part return an array of segment id's according to selected Names from json_segments (complex json)
|
||||||
@ -215,15 +215,15 @@ sub valetudo_r {
|
|||||||
my $TMF = AttrVal($NAME,'timeformat','');
|
my $TMF = AttrVal($NAME,'timeformat','');
|
||||||
if ($feature =~ m,(^Att.*|^Basic.*|^Loc.*),)
|
if ($feature =~ m,(^Att.*|^Basic.*|^Loc.*),)
|
||||||
{return {"$value"=>$EVENT} }
|
{return {"$value"=>$EVENT} }
|
||||||
if ($feature =~ m,(^Consum.*),)
|
if ($feature =~ m,(^Consum.*),)
|
||||||
{return ($TMF ne '') ? {"$value"=>sprintf "%dd %02dh %02dm",valetudo_dhms($EVENT)}:
|
{return ($TMF ne '') ? {"$value"=>sprintf "%dd %02dh %02dm",valetudo_dhms($EVENT)}:
|
||||||
{"$value"=>$EVENT} }
|
{"$value"=>$EVENT} }
|
||||||
if ($feature eq 'BatteryStateAttribute')
|
if ($feature eq 'BatteryStateAttribute')
|
||||||
{return $value eq 'level' ? {"batteryPercent"=>$EVENT}:
|
{return $value eq 'level' ? {"batteryPercent"=>$EVENT}:
|
||||||
$value eq 'status' ? {"batteryState"=>$EVENT}:{"$value"=>$EVENT} }
|
$value eq 'status' ? {"batteryState"=>$EVENT}:{"$value"=>$EVENT} }
|
||||||
if ($feature eq 'CurrentStatisticsCapability')
|
if ($feature eq 'CurrentStatisticsCapability')
|
||||||
{return $value eq 'area' ? {"$value"=>sprintf("%.2f",($EVENT / 10000))." m²"}:
|
{return $value eq 'area' ? {"$value"=>sprintf("%.2f",($EVENT / 10000))." m²"}:
|
||||||
($value eq 'time' and $TMF ne '') ? {"$value"=>sprintf "%02d:%02d:%02d",valetudo_dhms($EVENT)}:
|
($value eq 'time' and $TMF ne '') ? {"$value"=>sprintf "%02d:%02d:%02d",valetudo_dhms($EVENT)}:
|
||||||
{"$value"=>$EVENT} }
|
{"$value"=>$EVENT} }
|
||||||
if ($feature eq 'FanSpeedControlCapability')
|
if ($feature eq 'FanSpeedControlCapability')
|
||||||
{return $value eq 'preset' ? {"fanSpeed"=>$EVENT}:{"$value"=>$EVENT} }
|
{return $value eq 'preset' ? {"fanSpeed"=>$EVENT}:{"$value"=>$EVENT} }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user