Another question for developers. Code for default tile/value

I dont have a direct use case… I wanted to see the .json so I could see how a colored icon was displayed next to the status info. My case is above I posted the json but I will have to create custom attributes to display , alarm staate ie disarmed, armed away, armed stay, last alert type ie water, intrustion, smoke etc.
specifices about last alert, ie which sensor was triggered.

and a button to dismiss an alert (which turns off all notifications ie siren , colored lights etc.(

similiary to this device I have written for the old app

in addiition i have a device handler for the qubino weather station… currently the device is not even showing up under devices… Any idea why…Anyway here is the first part of the current code with tiles, that again will have to be all converted to custom capabilities

metadata {
definition (name: “Qubino Weatherstation V2”, namespace: “LGK-Apps”, author: “Kristjan Jamšek, kahn@lgk.com”) {
capability “Configuration” //Needed for configure() function to set MultiChannel Lifeline Association Set
capability “Temperature Measurement” //Used on main tile, needed in order to have the device appear in capabilities lists, mirrors temperatureCh1 attribute states
capability “Relative Humidity Measurement” //Needed in order to have the device appear in capabilities lists, mirrors humidityCh1 attribute states
capability “Sensor” // - Tagging capability
capability “Health Check”

	attribute "temperatureCh1", "number" // temperature attribute for Ch1 Temperature reported by device's endpoint 1
	attribute "windDirection", "number" // wind direction attribute for Wind Gauge - Direction reported by device's endpoint 2
	
	attribute "windVelocity", "number" // wind velocity attribute for Wind Gauge - Velocity reported by device's endpoint 3
	attribute "windGust", "number" // wind gust velocity attribute for Wind Gauge - Wind gust reported by device's endpoint 4
	attribute "windTemperature", "number" // wind temperature attribute for Wind Gauge - Temperature reported by device's endpoint 5
	attribute "windChillTemperature", "number" // wind chill temperature attribute for Wind Gauge - Wind Chill reported by device's endpoint 6
	attribute "rainRate", "number" // rain rate attribute for Rain Sensor data reported by device's endpoint 7
	attribute "humidityCh1", "number" // humidity attribute for Ch1 Humidity reported by device's endpoint 8
	attribute "temperatureCh2", "number" // temperature attribute for Ch2 Temperature reported by device's endpoint 9
	attribute "humidityCh2", "number" // humidity attribute for Ch2 Humidity reported by device's endpoint 10
	
	attribute "setConfigParams", "string" // attribute for tile element for setConfigurationParams command
	attribute "setAssocGroups", "string" // attribute for tile element for setAssociations command
	
    /* lgk last update times. */
    attribute "lastUpdateWind", "string"
	attribute "lastUpdateCh1", "string"
	attribute "lastUpdateCh2", "string"
	attribute "lastUpdateRain", "string"
    
    attribute "windMaxDate", "string"
	attribute "tempMaxDate", "string"
	attribute "tempMinDate", "string"
	attribute "rainMaxDate", "string"
    
    attribute "maxOutdoorTemp", "number"
	attribute "minOutdoorTemp", "number"
    attribute "maxRain", "number"
    attribute "maxWindGust", "number"
    
    attribute "windMaxDateStr", "string"
	attribute "tempMaxDateStr", "string"
	attribute "tempMinDateStr", "string"
	attribute "rainMaxDateStr", "string"

	command "setConfigurationParams" // command to issue Configuration Set command sequence according to user's preferences
	command "setAssociations" // command to issue Association Set command sequence according to user's preferences
	command "resetMaxMin" // lgk reset them

    fingerprint mfr:"0159", prod:"0007", model:"0053"  //Manufacturer Information values for Qubino Weatherstation
}


simulator {
	// TESTED WITH PHYSICAL DEVICE - UNNEEDED
}

tiles(scale: 2) {
	multiAttributeTile(name:"temperature", type:"generic", width:6, height:4, canChangeIcon: false) {
		tileAttribute("device.temperature", key: "PRIMARY_CONTROL") {
			attributeState("default", label:'${currentValue} °F', unit: "°F", icon: "st.Weather.weather2",
                 backgroundColors:[
            	[value: 1,  color: "#c8e3f9"],
            	[value: 10, color: "#dbdee2"],
            	[value: 20, color: "#c0d2e4"],
				[value: 32, color: "#153591"],
				[value: 44, color: "#1e9cbb"],
				[value: 59, color: "#90d2a7"],
				[value: 74, color: "#44b621"],
				[value: 84, color: "#f1d801"],
                [value: 92, color: "#d04e00"],
				[value: 98, color: "#bc2323"]
		])
        }
         tileAttribute("device.windChillTemperature", key: "SECONDARY_CONTROL") {
			attributeState("default", label:'Wind Chill ${currentValue} °F', unit:"°F")
            }
	
    }   

/*
tiles(scale: 2) {
	valueTile("temperature", "device.temperature") {
		state("temperature", label:'${currentValue} °F', unit:"°F", icon: "st.Weather.weather2", backgroundColors: [
		 	// Celsius Color Range
			[value: 0, color: "#153591"],
			[value: 7, color: "#1e9cbb"],
			[value: 15, color: "#90d2a7"],
			[value: 23, color: "#44b621"],
			[value: 29, color: "#f1d801"],
			[value: 33, color: "#d04e00"],
			[value: 36, color: "#bc2323"],
			// Fahrenheit Color Range
			[value: 40, color: "#153591"],
			[value: 44, color: "#1e9cbb"],
			[value: 59, color: "#90d2a7"],
			[value: 74, color: "#44b621"],
			[value: 84, color: "#f1d801"],
			[value: 92, color: "#d04e00"],
			[value: 96, color: "#bc2323"]
		])
	}
    */
 
	valueTile("humidity", "device.humidity") {
		state("humidity", label:'${currentValue} %', unit:"%", display:false)
	}	
    
	standardTile("temperatureCh1", "device.temperatureCh1", width: 3, height: 2) {
		state("temperatureCh1", label:'Temp. Ch1:\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
        	backgroundColors:[
            	[value: 1,  color: "#c8e3f9"],
            	[value: 10, color: "#dbdee2"],
            	[value: 20, color: "#c0d2e4"],
				[value: 32, color: "#153591"],
				[value: 44, color: "#1e9cbb"],
				[value: 59, color: "#90d2a7"],
				[value: 74, color: "#44b621"],
				[value: 84, color: "#f1d801"],
                [value: 92, color: "#d04e00"],
				[value: 98, color: "#bc2323"]

			])
	}
	standardTile("windDirection", "device.windDirection", width: 3, height: 2) {
		state("windDirection", label:'Wind Dir.:\n${currentValue}', unit: "", icon: 'st.Outdoor.outdoor20')
	}

	standardTile("windVelocity", "device.windVelocity", width: 3, height: 2) {
		state("windVelocity", label:'Wind Vel.:\n${currentValue} mph', unit:"mph", icon: 'st.Weather.weather1',
          backgroundColors: [
        	[value: 0, color: "#90d2a7"],
			[value: 5, color: "#44b621"],
			[value: 10, color: "#f1d801"],
			[value: 20, color: "#d04e00"],
			[value: 30, color: "#bc2323"]
            ]
            )
	}
	
	standardTile("windGust", "device.windGust", width: 3, height: 2) {
		state("windGust", label:'Wind Gust:\n${currentValue} mph', unit:"mph", icon: 'st.Weather.weather1',
        backgroundColors: [
        	[value: 0, color: "#90d2a7"],
			[value: 5, color: "#44b621"],
			[value: 10, color: "#f1d801"],
			[value: 20, color: "#d04e00"],
			[value: 30, color: "#bc2323"]
            ]
            )
	}
	standardTile("windTemperature", "device.windTemperature", width: 3, height: 2) {
		state("windTemperature", label:'Outdoor Temp.\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
     backgroundColors:[
            	[value: 1,  color: "#c8e3f9"],
            	[value: 10, color: "#dbdee2"],
            	[value: 20, color: "#c0d2e4"],
				[value: 32, color: "#153591"],
				[value: 44, color: "#1e9cbb"],
				[value: 59, color: "#90d2a7"],
				[value: 74, color: "#44b621"],
				[value: 84, color: "#f1d801"],
                [value: 92, color: "#d04e00"],
				[value: 98, color: "#bc2323"]

			])   
	}
	standardTile("windChillTemperature", "device.windChillTemperature", width: 3, height: 2) {
		state("windChillTemperature", label:'Wind Chill:\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
        backgroundColors:[
            	[value: 1,  color: "#c8e3f9"],
            	[value: 10, color: "#dbdee2"],
            	[value: 20, color: "#c0d2e4"],
				[value: 32, color: "#153591"],
				[value: 44, color: "#1e9cbb"],
				[value: 59, color: "#90d2a7"],
				[value: 74, color: "#44b621"],
				[value: 84, color: "#f1d801"],
                [value: 92, color: "#d04e00"],
				[value: 98, color: "#bc2323"]

			])
	}
	standardTile("rainRate", "device.rainRate", width: 3, height: 2) {
		state("rainRate", label:'Rain: ${currentValue} inches/h', unit:"inches/h", icon: 'st.Weather.weather10')
	}
	standardTile("humidityCh1", "device.humidityCh1", width: 3, height: 2) {
		state("humidityCh1", label:'Hum. Ch1:\n${currentValue} %', unit:"%", icon: 'st.Weather.weather12',
          backgroundColors : [
                [value: 01, color: "#724529"],
                [value: 11, color: "#724529"],
                [value: 21, color: "#724529"],
                [value: 35, color: "#44b621"],
                [value: 49, color: "#44b621"],
                [value: 50, color: "#1e9cbb"]
     ]        
     )	}
	standardTile("temperatureCh2", "device.temperatureCh2", width: 3, height: 2) {
		state("temperatureCh2", label:'Temp. Ch2:\n${currentValue} °F', unit:'°F', icon: 'st.Weather.weather2',
        	backgroundColors:[
            	[value: 1,  color: "#c8e3f9"],
            	[value: 10, color: "#dbdee2"],
            	[value: 20, color: "#c0d2e4"],
				[value: 32, color: "#153591"],
				[value: 44, color: "#1e9cbb"],
				[value: 59, color: "#90d2a7"],
				[value: 74, color: "#44b621"],
				[value: 84, color: "#f1d801"],
                [value: 92, color: "#d04e00"],
				[value: 98, color: "#bc2323"]

			])
	}
	standardTile("humidityCh2", "device.humidityCh2", width: 3, height: 2) {
		state("humidityCh2", label:'Hum. Ch2:\n${currentValue} %', unit:"%", icon: 'st.Weather.weather12',\
          backgroundColors : [
                [value: 01, color: "#724529"],
                [value: 11, color: "#724529"],
                [value: 21, color: "#724529"],
                [value: 35, color: "#44b621"],
                [value: 49, color: "#44b621"],
                [value: 50, color: "#1e9cbb"]
     ] )
	}
    
    // lgk reset max/min
    
    standardTile("resetMaxMin", "device.resetMaxMin", decoration: "flat", width: 2, height: 2) {
		state("resetMaxMin", label:'reset Max/Min', action:'resetMaxMin', icon: "st.secondary.tools")
	}
	standardTile("setConfigParams", "device.setConfigParams", decoration: "flat", width: 2, height: 2) {
		state("setConfigParams", label:'Set configuration', action:'setConfigurationParams', icon: "st.secondary.tools")
	}
	standardTile("setAssocGroups", "device.setAssocGroups", decoration: "flat", width: 2, height: 2) {
		state("setAssocGroups", label:'Set associations', action:'setAssociations', icon: "st.secondary.tools")
	}
	
    
    
        // lgk main max
     
        valueTile("maxWindGust", "device.maxWindGust", width: 3, height: 1) {
        state "default", label: 'Max Wind Gust:\n ${currentValue} mph' }
     
        valueTile("maxOutdoorTemp", "device.maxOutdoorTemp", width: 3, height: 1) {
        state "default", label: 'Max Outdoor Temp:\n ${currentValue} °F' }
  
        valueTile("minOutdoorTemp", "device.minOutdoorTemp", width: 3, height: 1) {
        state "default", label: 'Min Outdoor Temp:\n ${currentValue} °F' }
        
        valueTile("maxRain", "device.maxRain", width: 3, height: 1) {
        state "default", label: 'Max Rain:\n ${currentValue} inches/h' }
        
        
    	// lgk status tiles
    	valueTile("windMaxDate", "device.windMaxDate", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Date/Time:\n ${currentValue}'
				}
    	valueTile("tempMaxDate", "device.tempMaxDate", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Date/Time:\n ${currentValue}'
				}
    	valueTile("tempMinDate", "device.tempMinDate", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Date/Time:\n ${currentValue}'
				}
        valueTile("rainMaxDate", "device.rainMaxDate", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Date/Time:\n ${currentValue}'
				}
                
                 	// lgk status tiles
    	valueTile("windMaxDateStr", "device.windMaxDateStr", width: 3, height: 1, decoration: "flat") {
		state "default", label: '${currentValue}'
				}
    	valueTile("tempMaxDateStr", "device.tempMaxDateStr", width: 3, height: 1, decoration: "flat") {
		state "default", label: '${currentValue}'
				}
    	valueTile("tempMinDateStr", "device.tempMinDateStr", width: 3, height: 1, decoration: "flat") {
		state "default", label: '${currentValue}'
				}
        valueTile("rainMaxDateStr", "device.rainMaxDateStr", width: 3, height: 1, decoration: "flat") {
		state "default", label: '${currentValue}'
				}
    
    
    // lgk status tiles
    	valueTile("statusWind", "device.lastUpdateWind", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Wind Last Update: ${currentValue}'
				}
    	valueTile("statusCh1", "device.lastUpdateCh1", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Ch1 Last Update: ${currentValue}'
				}
    	valueTile("statusCh2", "device.lastUpdateCh2", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Ch2 Last Update: ${currentValue}'
				}
        valueTile("statusRain", "device.lastUpdateRain", width: 3, height: 1, decoration: "flat") {
		state "default", label: 'Rain Last Update: ${currentValue}'
				}
    
	main("temperature")
	
	details(["temperatureCh1", "humidityCh1", "temperatureCh2", "humidityCh2","windDirection", "windVelocity", "windGust", "windTemperature", 
        "windChillTemperature", "rainRate", "tempMinDateStr", "tempMaxDateStr", "windMaxDateStr", "rainMaxDateStr",
        "statusCh1", "statusCh2", "statusWind", "statusRain", "resetMaxMin","setConfigParams", "setAssocGroups"])

}

also using the smart weather station tile default device type in your list… it is not working correctly in the new app, detail view only shows temp, humidity and illumniation and uv index. there is tons more info on the view in the old app that needs to be converted…

ie

Vs

They already have and it worked before, but there are some issues with displaying all custom capabilities at the moment.

1 Like

@Lgkahn is your new dth psted anywhere?

After I generate the config.json file and run the above command I get the following error:

li - caught error Error: Request failed with status code 400: {"requestId":"2A3EBCB5-90FE-4785-BC7F-D31DDBCD748F","error":{"code":"BadRequestError","target":null,"message":"The request is malformed.","details":[]}}

It may be caused by the presence of manufacturerName and presentationId in the config file. Those are new terms that replace mnmn and vid and the API started adding them to output. Unfortunately it couldn’t seem to process them in input and I don’t think they’ve fixed the issue yet. The extra lines can be removed.

1 Like

Yup. That did the trick.

Ok So now that I can generate the device-config what do I do with it? The DH I am trying to change is for mu=y UPS, which. within the classic app , would appear like:

the command st presentation:device-config:generate UUID --dth --output=Cyberlink.json produces

{
    "type": "dth",
    "iconUrl": null,
    "dashboard": {
        "states": [
            {
                "component": "main",
                "capability": "battery",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ],
        "actions": [
            {
                "component": "main",
                "capability": "battery",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ]
    },
    "detailView": [
        {
            "component": "main",
            "capability": "battery",
            "version": 1,
            "values": [],
            "patch": [],
            "visibleCondition": null
        }
    ],
    "automation": {
        "conditions": [
            {
                "component": "main",
                "capability": "battery",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ],
        "actions": [
            {
                "component": "main",
                "capability": "battery",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ]
    },
    "vid": "cd501d13-f02e-3d03-a893-62fbac29ffb0",
    "mnmn": "SmartThingsCommunity"
}

What exactly do I need to change? The original DH is below

/**
 *  UPS Device*
 *  Author: C Dikland *
 *  Date: 2018-05-05
 */
// for the UI
metadata {
	// Automatically generated. Make future change here.
	definition (name: "Cyberpower UPS Tile v2", namespace: "cdikland", author: "CK Dikland", "vid": "cd501d13-f02e-3d03-a893-62fbac29ffb0",
    "mnmn": "SmartThingsCommunity") {
		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() {
}

pretty much nothing thats the rub with the new app short of writing something custom you can only show basically one thing on the panel

But I get nothing with the new app . The only thing it shows is Battery 0% vs the classic app that shows a 100% battery, :frowning:

You need to either rewrite it to use standard capabilities or make custom capabilities with the CLI. All of your capabilities are custom except battery which is why it doesn’t work.

If all you want is the voltage watts and battery this can be done with standard capabilities

2 Likes

Thank you, thank you. This got me to look at what I had originally done and noticed I defined Battery capability but didnt use its battery attribute. I added “Power Meter” as well but for some reason it isnt showing up (yet).

You’ll likely need to either delete and readd the device or switch to another dth from the IDE and then switch back to force clear the cache.

1 Like

I am also having issues with the default tile and the inability to display Temperature values. The RH values display without problems but if I use any handler where Temp is the Main I always get “Checking Status…” Clicking on the tile though shows the correct temperature. I tried several brand new DH one with just TEMP (capability “Temperature Measurement”) and the other with TEMP/RH capability “Temperature Measurement” + capability “Relative Humidity Measurement”). The latter will always display the RH value as the default regardless of what is stated in the DH (i.e. main([ “temperature”]) still displays the RH as default). The former, with only Temp defined shows only Checking Status

I should note that it will do this in the new app regardless of whether a device-config was generated/created or not. In fact all my unmodified devices that have Temperature as a default show Checking Status… In the Classic app everything appears as it should.

Well, I have got to believe there is something odd about temperature value within the new app.
I decided to delete my (hot tub probe) device and start form square one.

Created a brand new DH with only Temperature Measurement as a capability
Ran the t presentation:device-config:generate UUID --dth --output=hotTub.json which produced

{
    "type": "dth",
    "iconUrl": null,
    "dashboard": {
        "states": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ],
        "actions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ]
    },
    "detailView": [
        {
            "component": "main",
            "capability": "temperatureMeasurement",
            "version": 1,
            "values": [],
            "patch": [],
            "visibleCondition": null
        }
    ],
    "automation": {
        "conditions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ],
        "actions": [
            {
                "component": "main",
                "capability": "temperatureMeasurement",
                "version": 1,
                "values": [],
                "patch": [],
                "visibleCondition": null
            }
        ]
    },
    "vid": UUID,
    "mnmn": "SmartThingsCommunity"
}

Ran st presentation:device-config:create --input=hotTub.json and modified the DH to include vid and mnmn

/**
 *  Hot Tub Probe
 *
 *  Author: Cor Dikland
 *
 *  Date: June 3 2017 
 */
// for the UI
metadata {
	// Automatically generated. Make future change here.
	definition (name: "Hot Tub Probe", namespace: "cdikland", author: "CK Dikland", vid: UUID,
    mnmn: "SmartThingsCommunity") {
	capability "Temperature Measurement"
		command "refresh"
		command "resettemp"
            }
	tiles {
       valueTile("temperature", "device.temperature") {
			state "default", label:'${currentValue}°F', unit:"F",
				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("tempC", "device.tempC") {
			state "default", label:'${currentValue}°C', unit:"C",
				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("tempHI", "device.tempHI") {
			state "default", action: "resettemp", label:'High: ${currentValue}°F', unit:"F",
				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("tempLO", "device.tempLO") {
			state "default", action: "resettemp", label:'Low: ${currentValue}°F', unit:"F",
				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("lastResetLabel", "device.lastResetTime", decoration: "flat", width: 1) {
			state "default", label:'Last Temperature Event'
		}
		valueTile("lastTempTime", "device.lastTempTime", decoration: "flat", width: 2) {
			state "default", label:'${currentValue}'
		}

		main([ "temperature"])
		details([ "temperature", "tempHI","tempLO","lastResetLabel","lastTempTime", "tempC"])
        }
}

// 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 resettemp() {
	def x = device.currentValue("temperature")
    sendEvent(name: "tempHI", value: "$x")
    sendEvent(name: "tempLO", value: "$x")
	log.info "======================================= Resetting Temp Hi/Lo ====$x============================================="
}

def refresh() {
}

def configure() {
}

Same problem. All I get is the Checking Status. This only appear to be an issue with temperature. If I change the capability to Relative Humidity Measurement I dont have this problem and the RH displays properly. Adding insult to injury, the Temperature value displayed within the New App always a has a C(elsius) unit eventhough the DH defines unit as F The actual value displayed however is correct. Thats the good news

Now here’s a day debugging I wont get back :frowning:

Try adding a sendEvent( name: "temperature", unit: "F" ) or whatever the unit is. The app seems to like units.

1 Like

You are a friggen genius. Problem fixed :slight_smile:

I spoke too soon. :frowning: This all started with my sensors refusing to display the Temp as a default. No matter what I tried it would either just display the RH or Checking Status… Thanks to orangebucket who suggested trying sendEvent( name: “temperature”, unit: “F” ) that problem was fixed except for…

Of the 8 temperature sensors, two should display the RH as a default. No way… This is super frustrating. I even went as far as deleting these two devices and recreating them with a “new” DH where RH is the default. I tried sendEvent( name: “humidity”, unit: “%” ) or sendEvent( name: “humidity” ) and neither work. All I get in both cases is C hecking Status

#Bump#

Did you manage to resolve the “Checking status…” issue?

I am also trying to create a custom capability within my own namespace that is a complete duplicate of the standard “Temperature Measurement” capability, other than a couple of bits (labels etc.) which I have made bespoke to my custom capability.

I can create the custom capability and its associated capability presentation fine, add it to my overall device config and create a custom presentation (mnmn & vid) with it.

However, when I apply my mnmn and vid to my DTH, as well as declare the custom capability, all I ever get is the dashboard tile stating “Checking status…” and a no-cloud icon on the tile in the detailed view.

Also, I have noticed that I don’t get the graph icon in the top right of the detailed view tile with my custom capability, whereas I do get the graph icon if I switch back to using the standard “Temperature Measurement” capability, which my custom capability is 99% based upon. Why is that?

There is also other weirdness going on with displayTypes, I find. Again, if I create a custom capability that is a complete duplicate of one of the standard capabilities, apart from subtle label amendments, using the standard capability I see “+” and “-” round buttons on the detailed view tile, but with my custom capability (99% based on the standard capability) I don’t. Why is that?