I have written several custom DH in the past and all work fine in the classic app. The new app, on the other hand, totally messes them up. As an example, below are screenshots of my UPS unit. Currently, the classic app continues to display each attribute correctly. The new app on the other hand Is there something I need to do to each of my custom DH to make them work properly in the new app?
This is the DH I use for the above device
/**
* UPS Device*
* Author: C Dikland *
* Date: 2018-05-05
*/
// for the UI
metadata {
// Automatically generated. Make future change here.
definition (name: "Cyberpower UPS Tile v1", namespace: "cdikland", author: "CK Dikland") {
capability "Battery"
attribute "comm_lost", "string"
attribute "model_name", "string"
attribute "power_supplied", "string"
attribute "voltage_condition", "string"
attribute "ups_load", "string"
attribute "battery_situation", "string"
attribute "battery_capacity", "string"
attribute "input_voltage", "string"
attribute "output_voltage", "string"
attribute "load_level", "string"
attribute "current_watt", "string"
attribute "remain_runtime", "string"
attribute "last_event_date", "string"
attribute "update_time", "string"
command "refresh"
}
/****************************************************************************************
preferences {
input "zipCode", "text", title: "Zip Code (optional)", required: false
}
*********************************************************************************************/
tiles {
valueTile("comm_lost", "device.comm_lost") {
state "default", label:'comm_lost ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("model_name", "device.model_name") {
state "default", label:'model_name ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("power_supplied", "device.power_supplied") {
state "default", label:'power_supplied ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("voltage_condition", "device.voltage_condition") {
state "default", label:'voltage_condition ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("ups_load", "device.ups_load") {
state "default", label:'ups_load ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("battery_capacity", "device.battery_capacity") {
state "default", label:'${currentValue}%',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("battery_situation", "device.battery_situation") {
state "default", label:'${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("input_voltage", "device.input_voltage") {
state "default", label:'Input ${currentValue}V',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("output_voltage", "device.output_voltage") {
state "default", label:'Output ${currentValue}V',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("load_level", "device.load_level") {
state "default", label:'Load ${currentValue}%',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("current_watt", "device.current_watt") {
state "default", label:'Draw ${currentValue}W',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("remain_runtime", "device.remain_runtime") {
state "default", label:'Remain Time ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("last_event_date", "device.last_event_date") {
state "default", label:'Last Event Date ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
valueTile("update_time", "device.update_time") {
state "default", label:'Last Update ${currentValue}',
backgroundColors:[
[value: 19, color: "#9F8ACD"],
[value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"],
[value: 59, color: "#90d2a7"],
[value: 74, color: "#44b621"],
[value: 84, color: "#f1d801"],
[value: 95, color: "#d04e00"],
[value: 96, color: "#bc2323"]
]
}
main(["battery_capacity", "battery_situation","input_voltage", "output_voltage", "load_level", "current_watt" , "remain_runtime", "update_time","comm_lost","power_supplied","voltage_condition","ups_load"])
details(["battery_capacity" , "battery_situation","input_voltage", "output_voltage", "load_level", "current_watt", "remain_runtime", "update_time","comm_lost","power_supplied","voltage_condition","ups_load"])}
}
// parse events into attributes
def parse(String description) {
log.debug "Parsing '${description}'"
}
def generateEvent(Map results) {
results.each { name, value ->
sendEvent(name: name, value: value)
}
return null
}
def refresh() {
}
def configure() {
}