mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
mqtt2.template: more changes II wrt. to shelly 2. gen
git-svn-id: https://svn.fhem.de/fhem/trunk@25454 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
490a254bc6
commit
f9337682b7
@ -3326,7 +3326,7 @@ setreading DEVICE attrTemplateVersion 20200831
|
|||||||
# Shelly Plus 1 using original firmware.
|
# Shelly Plus 1 using original firmware.
|
||||||
name:shellyPlus_1
|
name:shellyPlus_1
|
||||||
filter:TYPE=MQTT2_DEVICE
|
filter:TYPE=MQTT2_DEVICE
|
||||||
desc:Early version of a base template for second generation shelly devices (names with "plus", without power measurement)
|
desc:Early version of a base template for second generation shelly devices (names with "plus", without power measurement). NOTE: requires to activate generic status update in firmware settings.
|
||||||
par:DEV_TPC;Shelly name in the topic;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<(shellies/[^/]+|shellyp(lus|ro4pm)[^/:_]{4,}+)> ? $1 : undef }
|
par:DEV_TPC;Shelly name in the topic;{ AttrVal('DEVICE','devicetopic',AttrVal('DEVICE','readingList','')) =~ m<(shellies/[^/]+|shellyp(lus|ro4pm)[^/:_]{4,}+)> ? $1 : undef }
|
||||||
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
|
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
|
||||||
order:A_20
|
order:A_20
|
||||||
@ -3348,7 +3348,7 @@ attr DEVICE readingList $\DEVICETOPIC/online:.* online\
|
|||||||
$\DEVICETOPIC/status/switch_0:.* { $EVENT =~ s/"output":true/"state":"on"/g; $EVENT =~ s/"output":false/"state":"off"/g; json2nameValue($EVENT, 'switch_', $JSONMAP) }\
|
$\DEVICETOPIC/status/switch_0:.* { $EVENT =~ s/"output":true/"state":"on"/g; $EVENT =~ s/"output":false/"state":"off"/g; json2nameValue($EVENT, 'switch_', $JSONMAP) }\
|
||||||
fhem2shelly/rpc:.* {}
|
fhem2shelly/rpc:.* {}
|
||||||
attr DEVICE devStateIcon {my $onl = ReadingsVal($name,'online','false') eq 'false'?'10px-kreis-rot': '10px-kreis-gruen'; $onl = FW_makeImage($onl); my $light = FW_makeImage(ReadingsVal($name,'state','off')); my $temp = ReadingsVal($name,'temperature','-100'); my $ip = ReadingsVal($name,'ip','none'); qq(<a href="http://$ip"target="_blank">${onl}</a><a href="/fhem?cmd.dummy=set $name toggle&XHR=1">${light}</a><div>Temp: $temp °C</div>)}
|
attr DEVICE devStateIcon {my $onl = ReadingsVal($name,'online','false') eq 'false'?'10px-kreis-rot': '10px-kreis-gruen'; $onl = FW_makeImage($onl); my $light = FW_makeImage(ReadingsVal($name,'state','off')); my $temp = ReadingsVal($name,'temperature','-100'); my $ip = ReadingsVal($name,'ip','none'); qq(<a href="http://$ip"target="_blank">${onl}</a><a href="/fhem?cmd.dummy=set $name toggle&XHR=1">${light}</a><div>Temp: $temp °C</div>)}
|
||||||
attr DEVICE jsonMap switch_state:state switch_aenergy_total:aenergy_total params_switch_0_apower:apower temperature_tC:temperature temperature_tF:0 params_wifi_sta_ip:ip
|
attr DEVICE jsonMap switch_state:state switch_temperature_tC:temperature switch_temperature_tF:0 params_wifi_sta_ip:ip
|
||||||
attr DEVICE setStateList on off toggle
|
attr DEVICE setStateList on off toggle
|
||||||
attr DEVICE webCmd :
|
attr DEVICE webCmd :
|
||||||
attr DEVICE model shellyPlus_1
|
attr DEVICE model shellyPlus_1
|
||||||
@ -3359,7 +3359,7 @@ set DEVICE attrTemplate speechcontrol_type_switch
|
|||||||
# Shelly Plus 1PM using original firmware.
|
# Shelly Plus 1PM using original firmware.
|
||||||
name:shellyPlus_1pm
|
name:shellyPlus_1pm
|
||||||
filter:TYPE=MQTT2_DEVICE
|
filter:TYPE=MQTT2_DEVICE
|
||||||
desc:Early version of a base template for second generation shelly devices (names with "plus", with power measurement)
|
desc:Early version of a base template for second generation shelly devices (names with "plus", with power measurement). NOTE: requires to activate generic status update in firmware settings.
|
||||||
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
|
par:CALLSPEECHRECOGN;Set this to 0 to not set any speech recogn. related attributes;{ 1 }
|
||||||
order:A_20a
|
order:A_20a
|
||||||
set DEVICE attrTemplate shellyPlus_1 \CALLSPEECHRECOGN=0
|
set DEVICE attrTemplate shellyPlus_1 \CALLSPEECHRECOGN=0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user