Hi Paul,
I was having the same problem, what fixed it for me was not using multi - attribute tiles, instead only use value tiles and not declaring a tile as main
only using tiles for details
. My setup is shown below for the two different SmartThings apps. Ensure you have the capability "Voltage Measurement"
defined for your device as well.
The code setup for my tiles is in the snippet below.
// tile definitions
tiles(scale: 2) {
// Current value of power
valueTile("power", "device.power", decoration: "flat", width: 2, height: 2) {
state "default", label:'${currentValue} W'
}
// Current value of energy
valueTile("energy", "device.energy", decoration: "flat", width: 2, height: 2) {
state "default", label:'${currentValue} kWh'
}
// Current value of voltage
valueTile("voltage", "device.voltage", decoration: "flat", width: 2, height: 2) {
state "default", label:'${currentValue} V'
}
// Reset Button
standardTile("reset", "device.energy", inactiveLabel: false, decoration: "flat",width: 2, height: 2) {
state "default", label:'reset kWh', action:"reset"
}
// Refresh button
standardTile("refresh", "device.power", inactiveLabel: false, decoration: "flat",width: 2, height: 2) {
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
}
// Configuration Button
standardTile("configure", "device.power", inactiveLabel: false, decoration: "flat",width: 2, height: 2) {
state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure"
}
// Show the tiles
details(["power","energy","voltage", "reset","refresh", "configure"])
}
Unfortunately the buttons I have defined which work in the classic app do not work in the new app, if anyone reading has suggestions on this let me know! The only one that seems to work is the refresh
but its called when I scroll up to the very top and then let go to refresh in the app, there is no button.
As @orangebucket said as well I am including a unit for each event I am creating with the meter. In the code below it shows how I create the events, the first function is a bit redundant as all it does is call another function but I have not got chance to update. The code below is for a Z-Wave meter using the command class meter report V3 so may have to be slightly altered if you are using something different.
def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd) {
meterReport(cmd, cmd.scaledMeterValue)
}
private meterReport(cmd, value) {
def meterTypes = ["Unknown", "Electric", "Gas", "Water"]
def electricNames = ["energy", "energy", "power", "count", "voltage", "current", "powerFactor", "unknown"]
def electricUnits = ["kWh", "kVAh", "W", "pulses", "V", "A", "Power Factor", ""]
def map = [ name: electricNames[cmd.scale], unit: electricUnits[cmd.scale], displayed: state.display]
log.debug("Scale: ${cmd.scale} Type: ${electricNames[cmd.scale]} Units: ${electricUnits[cmd.scale]}")
switch(cmd.scale) {
case 0: //kWh
map.value = cmd.scaledMeterValue
break
case 1: //kVAh
map.value = cmd.scaledMeterValue
break;
case 2: //Watts
[name: "Power", value: value, unit: "W"]
map.value = cmd.scaledMeterValue
break;
case 3: //pulses
map.value = cmd.scaledMeterValue
break;
case 4: //Volts]
map.value = cmd.scaledMeterValue
break;
case 5: //Amps
map.value = cmd.scaledMeterValue
break;
case 6: //Power Factor
map.value = cmd.scaledMeterValue
break
case 7: //Unknown
map.value = cmd.scaledMeterValue
break;
default:
break;
}
createEvent(map)
}
Hope this helps!