Suddenly tiles not displaying correctly in iOS 2.1.4

My device type for ZXT-120 has suddenly starting displaying one of two temp tiles incorrectly.

2.1.5 update doesn’t fix the issue either. Which makes sense since they say they didn’t change anything but add a device.

The 172° tile in red is hopefully incorrect.
The AC 78° tile is hopefully correct.

If I refresh it becomes 78° until I leave the page and then come back in.

This device code has been fine for long time and I have not touched the code. So what might have changed?

Also when I refresh in the log I see something called “ThermostatModeDirector” so seems like more shenanigans on the server side are happening :slight_smile:

The code for the failing tile is this

valueTile(“temperature”, “device.temperature”) {
state(“temperature”, label:’${currentValue}°’,
[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”]

The code for the tile that works is this but I create the temp reading before I push the value and it seems the tile is converting my 78 to Celsius 172.

// Extra Temperature Tile with Name for Home Screen valueTile("temperatureName", "device.temperatureName", inactiveLabel: false, decoration: "flat") { state "temperatureName", label:'${currentValue}', unit:"" } The code pushing the values is here. // - Sensor Multilevel Report // The device is reporting temperature readings def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv3.SensorMultilevelReport cmd) { log.debug "SensorMultilevelReport reporting...cmd=$cmd" // Determine the temperature the device is reporting def map = [:] switch (cmd.sensorType) { case 1: // temperature def cmdScale = cmd.scale == 1 ? "F" : "C" // converTemp returns string with two decimal places // convert to double then to int to drop the decimal Integer temp = (int) convertTemperatureIfNeeded(cmd.scaledSensorValue, cmdScale).toDouble() map.value = temp map.unit = getTemperatureScale() = "temperature" // Send event to set ShortName + Temp tile def shortNameVal = shortName == null ? "ZXT-120" : shortName def tempName = shortNameVal + " " + map.value + "°" log.debug "Sensor Reporting temperatureName $tempName" sendEvent("name":"temperatureName", "value":tempName) sendEvent("name":"temperature", "value":map.value, "isStateChange":true, unit:cmdScale, displayed:true) break; default: log.warn "Unknown sensorType reading from device" break; } }

Maybe related to this?

I don’t understand. Neither tile uses css, and the working tile is completely raw it’s just a value tile that used to work. The other tile is a text tile and I compute the correct temp and configure set the text to "Name " + myComputed Temp. That works fine.

So I think somehow they broke the processing for Value Tiles to be Celsius/Fahrenheit smart. Actually my code is pushing converted degrees so perhaps the opposite is true they added the C/F intelligence and didn’t bother telling us.

Something broke, for sure. :disappointed_relieved:

Tagging @tgauchat

1 Like

The OP’s Topic is non-SmartTiles related, but, sure, it could be symptomatic of the same underlying SmartThings “platform issue” that has sporadically affected some of our users that use Custom CSS.

@slagle @jody.albritton tagged for standard protocol.

This is certainly not a SmartTiles issue – we have not made a single character change to our code.

I altered my code to not call “convertTempIfNeeded” and it now displays incorrectly when you update but corrects itself when you reload the tiles by leaving and returning.

So basically whatever they broke can’t be fixed because I need to send converted temp to get it correct it the page is already displayed and I need to send the unconverted temp to get it to display correctly when the tile is loaded with the entire page.

I am not using SmartTiles. I never said SmartTiles :slight_smile:

1 Like

Sorry for any confusion. I know this thread is not about smarttiles. My point was just that all of a sudden today both smarttiles users and some custom DTH users were reporting that they had changed nothing but the tiles are broken. So that sounded to me like a possible related platform issue. Maybe it’s two completely unrelated problems that just happened to occur at the same time. :scream:

@slagle Are the devs aware that this is broken ?

Try updating to the latest version of the app first, please.

I am on 2.1.5 (1301) is that not the latest? I said on my first post that updating to 2.1.5 didn’t fix the issue.

Full code here BTW

@slagle I found the bug. I am not guessing that what really happened is the valueTile was fixed to handle C/F temps correctly. I was passing a temp in fahrenheit with a unit of Celsius. This has worked for over a year but now stopped working. But the bug was always in my code.

sendEvent(“name”:“temperature”, “value”:map.value, “isStateChange”:true, unit:cmdScale, displayed:true)
Since map.value was converted to Fahrenheit I needed to hard code the unit to the same. So correct code is.
sendEvent(“name”:“temperature”, “value”:map.value, “isStateChange”:true, unit:1, displayed:true)