mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
mqtt2.template: small changes to OMG-temp-hum sensor
git-svn-id: https://svn.fhem.de/fhem/trunk@22775 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
7c65595bd3
commit
d0e31158a1
@ -3446,7 +3446,7 @@ setreading DEVICE attrTemplateVersion 20200522 or prior
|
||||
name:OpenMQTTGateway_BT_temp_hum_sensor
|
||||
prereq:{my @devices=devspec2array("model=OpenMQTTGateway_MCU");;return 1 if $devices[0];;return 0}
|
||||
filter:TYPE=MQTT2_DEVICE:FILTER=readingList=.*/O[^/]*M[^/]*G[^/]*/.*
|
||||
desc:use this with an OpenMQTTGateway. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: You'll be asked to provide the HEX address of your sensor. Best start with looking at what "OpenMQTTGateway_BT_scanner" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
desc:use this with an OpenMQTTGateway for temp/hum sensors like LYWSD03MMC and LYWSDCGQ. For further details visit https://github.com/1technophile/OpenMQTTGateway/wiki<br>Recommended structure of the topic pattern home/OpenMQTTGateway/.*.<br>NOTE: You'll be asked to provide the HEX address of your sensor. Best start with looking at what "OpenMQTTGateway_BT_scanner" povides, e.g. if you have a reading name like "6C697244245E_id", "6C697244245E" (without quotes) is what you want to enter...<br>NOTE: this will create a new device!
|
||||
order:X_02d
|
||||
par:BT_ID;Pls. enter your bluetooth device ID; {undef}
|
||||
par:BASE_ID;BASE_ID typically is home;{ AttrVal("DEVICE","readingList","") =~ m,([^:]+)[/]O[^/]*M[^/]*G[^/]*[/].*:, ? $1 : undef }
|
||||
@ -3460,12 +3460,12 @@ attr OMG_BT_ID readingList\
|
||||
attr OMG_BT_ID event-min-interval 300
|
||||
attr OMG_BT_ID event-on-change-reading batteryPercent,temperature:0.2,humidity:0.2,rssi:5,distance:5
|
||||
attr OMG_BT_ID icon temperature_humidity
|
||||
attr OMG_BT_ID jsonMap batt:batteryPercent tem:temperature hum:humidity servicedatauuid:0 servicedata:0
|
||||
attr OMG_BT_ID jsonMap batt:batteryPercent tempc:temperature tem:0 tempf:0 hum:humidity servicedatauuid:0 servicedata:0
|
||||
attr OMG_BT_ID stateFormat T: temperature°C, H: humidity%rH
|
||||
attr OMG_BT_ID room NEWDEVROOM
|
||||
{ fhem "trigger $FW_wname JS:location.href='$FW_ME?detail=OMG_BT_ID'" if($cl && $cl->{TYPE} eq "FHEMWEB") }
|
||||
attr OMG_BT_ID model OpenMQTTGateway_BT_temp_hum_sensor
|
||||
setreading OMG_BT_ID attrTemplateVersion 20200716
|
||||
setreading OMG_BT_ID attrTemplateVersion 20200913
|
||||
|
||||
|
||||
###############
|
||||
|
Loading…
x
Reference in New Issue
Block a user