@@ -1174,7 +1174,7 @@ def callbackForEveryThing(evt) {
11741174 // TEMP
11751175 if (it?. Type . contains(" Temp" )) {
11761176 state. optionsTemperature[it. idx] = " ${ it.idx} : ${ it.Name} "
1177- socketSend([request : " SensorTempNotification" , idx : it. idx])
1177+ if ( it.Notifications == " false " ) socketSend([request : " SensorTempNotification" , idx : it. idx])
11781178 }
11791179 // MOTION
11801180 if (it?. SwitchTypeVal == 8 ) {
@@ -1192,21 +1192,21 @@ def callbackForEveryThing(evt) {
11921192 // LUX
11931193 if (it?. Type == " Lux" ) {
11941194 state. optionsLux[it. idx] = " ${ it.idx} : ${ it.Name} "
1195- socketSend([request : " SensorLuxNotification" , idx : it. idx])
1195+ if ( it.Notifications == " false " ) socketSend([request : " SensorLuxNotification" , idx : it. idx])
11961196 }
11971197 // THERMOSTAT
11981198 if (it?. Type == " Thermostat" ) {
1199- socketSend([request : " Notification" , idx : it. idx, type :0 , action :" %24value" ])
1199+ if ( it.Notifications == " false " ) socketSend([request : " Notification" , idx : it. idx, type :0 , action :" %24value" ])
12001200 }
12011201 // HUMIDITY
12021202 if (it?. Humidity ) {
12031203 state. optionsHumidity[it. idx] = " ${ it.idx} : ${ it.Name} "
1204- socketSend([request : " SensorHumidityNotification" , idx : it. idx])
1204+ if ( it.Notifications == " false " ) socketSend([request : " SensorHumidityNotification" , idx : it. idx])
12051205 }
12061206 // SOUND
12071207 if (it?. SubType == " Sound Level" ) {
12081208 state. optionsSound[it. idx] = " ${ it.idx} : ${ it.Name} "
1209- socketSend([request : " SensorSoundNotification" , idx : it. idx])
1209+ if ( it.Notifications == " false " ) socketSend([request : " SensorSoundNotification" , idx : it. idx])
12101210 }
12111211 // CUSTOM
12121212 if (it?. Type == " General" ) {
@@ -1218,17 +1218,17 @@ def callbackForEveryThing(evt) {
12181218 // AIR QUAILTY
12191219 if (it?. Type == " Air Quality" ) {
12201220 state. optionsAirQuality[it. idx] = " ${ it.idx} : ${ it.Name} "
1221- socketSend([request : " SensorAirQualityNotification" , idx : it. idx])
1221+ if ( it.Notifications == " false " ) socketSend([request : " SensorAirQualityNotification" , idx : it. idx])
12221222 }
12231223 // PRESSURE
12241224 if (it?. Barometer ) {
12251225 state. optionsPressure[it. idx] = " ${ it.idx} : ${ it.Name} "
1226- socketSend([request : " SensorPressureNotification" , idx : it. idx])
1226+ if ( it.Notifications == " false " ) socketSend([request : " SensorPressureNotification" , idx : it. idx])
12271227 }
12281228 // USAGE ENERGY (P1 meters)
12291229 if (it?. Type == " P1 Smart Meter" && it?. SubType == " Energy" ) {
12301230 state. optionsPower[it. idx] = " ${ it.idx} : ${ it.Name} "
1231- socketSend([request : " SensorKWHNotification" , idx : it. idx])
1231+ if ( it.Notifications == " false " ) socketSend([request : " SensorKWHNotification" , idx : it. idx])
12321232 if (settings. domoticzReportPower && statePower?. idxPower == it. idx) {
12331233 devReportPower = getChildDevice(state. devReportPower)
12341234 if (devReportPower) {
@@ -1255,7 +1255,7 @@ def callbackForEveryThing(evt) {
12551255 // USAGE POWER
12561256 if (it?. SubType == " kWh" ) {
12571257 state. optionsPower[it. idx] = " ${ it.idx} : ${ it.Name} "
1258- socketSend([request : " SensorKWHNotification" , idx : it. idx])
1258+ if ( it.Notifications == " false " ) socketSend([request : " SensorKWHNotification" , idx : it. idx])
12591259 kwh = kwh + Float . parseFloat(it.Data . split()[0 ])
12601260 watt = watt + Float . parseFloat(it.Usage . split()[0 ])
12611261
@@ -1294,7 +1294,7 @@ def callbackForEveryThing(evt) {
12941294 // USAGE GAS
12951295 if (it?. SubType == " Gas" ) {
12961296 state. optionsGas[it. idx] = " ${ it.idx} : ${ it.Name} "
1297- socketSend([request : " SensorGasNotification" , idx : it. idx])
1297+ if ( it.Notifications == " false " ) socketSend([request : " SensorGasNotification" , idx : it. idx])
12981298 gasTotal = gasTotal + Float . parseFloat(it.Counter )
12991299 gasUsage = gasUsage + Float . parseFloat(it.CounterToday . split()[0 ])
13001300
0 commit comments