Still not succeeding
I'm just trying to introduce a variable that 'weights' the overall user value entered. The code below works btw. I just want to add a .75 reduction so if the user enters 100, the actual value is .75 . I think I may be trying to do math on a string and not an integer. What is the syntax to convert a string to int?
here is the offending code :
attribute "tileFontSize", "number"
input(name: "existingTileFontSize", type: "num", title: "HTML Tile Font Size (%)*", defaultValue: 100)
def tileFontSize() {
tileFontSize = 100
if(existingTileFontSize > " ") tileFontSize = existingTileFontSize
sendEvent(name: "Tile Font Size", value: tileFontSize)
}
sendEvent(name: "seasonTile", value: "<div style='background-image: url(${iconPath}${seasonName}.svg);background-position: center;background-repeat: no-repeat;background-size: contain;width: 100%;height: 100%;'><div style='font-family: Georgia, serif;text-align: center;position: relative;top:${existingTileVertWordPos}%;font-size:${existingTileFontSize}%;color:${existingTileFontColor};text-transform: uppercase;font-style: oblique;'><h1 style='font-size:${existingTileFontSize}%;'>${seasonName}</h1></div></div>", descriptionText: descriptionText)