Code by Scott שאול בן ישוע
Verified Commit 2d845984 authored by Sha'ul ben Yeshua's avatar Sha'ul ben Yeshua 🎗
Browse files

changed all physicalgraph to hubitat

parent 1d4fa8a3
Pipeline #144 passed with stage
in 1 second
......@@ -15,10 +15,10 @@
*/
metadata {
definition (name: "FortrezZ Flow Meter Interface", namespace: "fortrezz", author: "Daniel Kurin") {
capability "Battery"
capability "Energy Meter"
capability "Image Capture"
capability "Temperature Measurement"
capability "Battery"
capability "Energy Meter"
capability "Image Capture"
capability "Temperature Measurement"
capability "Sensor"
capability "Water Sensor"
......@@ -216,7 +216,7 @@ def zero()
], 100)
}
def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelReport cmd)
def zwaveEvent(hubitat.zwave.commands.sensormultilevelv5.SensorMultilevelReport cmd)
{
log.debug cmd
def map = [:]
......@@ -245,7 +245,7 @@ def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelR
return map
}
def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd)
def zwaveEvent(hubitat.zwave.commands.meterv3.MeterReport cmd)
{
def map = [:]
map.name = "gpm"
......@@ -262,7 +262,7 @@ def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd)
return map
}
def zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport cmd)
def zwaveEvent(hubitat.zwave.commands.alarmv2.AlarmReport cmd)
{
def map = [:]
if (cmd.zwaveAlarmType == 8) // Power Alarm
......@@ -335,7 +335,7 @@ def zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport cmd)
return map
}
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
def zwaveEvent(hubitat.zwave.commands.batteryv1.BatteryReport cmd) {
def map = [:]
if(cmd.batteryLevel == 0xFF) {
map.name = "battery"
......@@ -351,7 +351,7 @@ def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
return map
}
def zwaveEvent(physicalgraph.zwave.Command cmd)
def zwaveEvent(hubitat.zwave.Command cmd)
{
log.debug "COMMAND CLASS: $cmd"
}
......@@ -436,4 +436,4 @@ def setThreshhold(rate)
cmds << zwave.configurationV2.configurationSet(configurationValue: [(int)Math.round(rate*10)], parameterNumber: 5, size: 1).format()
sendEvent(event)
return response(cmds) // return a list containing the event and the result of response()
}
\ No newline at end of file
}
......@@ -15,10 +15,10 @@
*/
metadata {
definition (name: "FortrezZ Flow Meter Interface", namespace: "fortrezz", author: "Daniel Kurin") {
capability "Battery"
capability "Energy Meter"
capability "Image Capture"
capability "Temperature Measurement"
capability "Battery"
capability "Energy Meter"
capability "Image Capture"
capability "Temperature Measurement"
capability "Sensor"
capability "Water Sensor"
......@@ -217,7 +217,7 @@ def zero()
], 100)
}
def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelReport cmd)
def zwaveEvent(hubitat.zwave.commands.sensormultilevelv5.SensorMultilevelReport cmd)
{
log.debug cmd
def map = [:]
......@@ -246,7 +246,7 @@ def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelR
return map
}
def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd)
def zwaveEvent(hubitat.zwave.commands.meterv3.MeterReport cmd)
{
def map = [:]
map.name = "gpm"
......@@ -263,7 +263,7 @@ def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd)
return map
}
def zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport cmd)
def zwaveEvent(hubitat.zwave.commands.alarmv2.AlarmReport cmd)
{
def map = [:]
if (cmd.zwaveAlarmType == 8) // Power Alarm
......@@ -336,7 +336,7 @@ def zwaveEvent(physicalgraph.zwave.commands.alarmv2.AlarmReport cmd)
return map
}
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
def zwaveEvent(hubitat.zwave.commands.batteryv1.BatteryReport cmd) {
def map = [:]
if(cmd.batteryLevel == 0xFF) {
map.name = "battery"
......@@ -352,7 +352,7 @@ def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
return map
}
def zwaveEvent(physicalgraph.zwave.Command cmd)
def zwaveEvent(hubitat.zwave.Command cmd)
{
log.debug "COMMAND CLASS: $cmd"
}
......@@ -437,4 +437,4 @@ def setThreshhold(rate)
cmds << zwave.configurationV2.configurationSet(configurationValue: [(int)Math.round(rate*10)], parameterNumber: 5, size: 1).format()
sendEvent(event)
return response(cmds) // return a list containing the event and the result of response()
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment