Progress is being made (I got some amazing help from @thebearmay ), Im just seeking some help from one of our CSS Dev Guru's on how to de-uglify it.
Argh - the 3 Day Forecast Tile sometimes works and then other times it fails (runs into a 1024 char limit for tile content).
It does look good when it works tho:
and less good when it fails:
So I'm going to make a Nice tile for each day - it's the only way to do this reliably.
Ok, that works - folks let me know if there are any tweaks you would like to see (eg to the title etc).
Thanks for the updates!
This might be a stupid question, but how do you get it to state the specific day of the week instead of "forecast today", forecast tomorrow", forecastdayaftertomorrow"? Having it say, e.g., "Sunday", "Monday", "Tuesday", as it does with your tiles, looks much better.
Itβs fairly easy, first i pull the days from the WU tables and populate them into Hubitat attributes.
The the part I needed help with was getting the days and forecast data into the tiles (@thebearmay and @sburke781 helped me understand this process).
This is the code I eventually settled on before being bitten by the 1024 character limit.
def updateTile() {
log.debug "updateTile called"
html ="<div style='line-height:1; font-size:1em;'><br>3 Day Forecast<br></div>"
html +="<div style='line-height:50%;'><br></div>"
html +="<div style='line-height:0.95; font-size:0.75em; text-align: left;'><br>Forecast for ${device.currentValue('today')}<br></div>"
html +="<div style='line-height:0.95; font-size:0.75em; text-align: justify;'><br>${device.currentValue('forecastToday')}<br></div>"
html +="<div style='line-height:50%;'><br></div>"
html +="<div style='line-height:0.95; font-size:0.75em; text-align: left;'><br>Forecast for ${device.currentValue('tomorrow')}<br></div>"
html +="<div style='line-height:0.95; font-size:0.75em; text-align: justify'><br>${device.currentValue('forecastTomorrow')}<br></div>"
html +="<div style='line-height:50%;'><br></div>"
html +="<div style='line-height:0.95; font-size:0.75em; text-align: left;'><br>Forecast for ${device.currentValue('dayAfterTomorrow')}<br></div>"
html +="<div style='line-height:0.95; font-size:0.75em; text-align: justify'><br>${device.currentValue('forecastDayAfterTomorrow')}<br></div>"
sendEvent(name: "html", value: "$html")
log.debug "html contains ${html}"
log.debug "${html.length()}"
}
Got it, and thanks!
No worries.
Ok, v6.1.1 has been published.
the Tiles are labelled:
htmlToday
htmlTomorrow
htmlDayAfterTomorrow
I recommend using them like this:
If folks are interested, tomorrow Iβll add the station location attribute to the tile title:
station_location : Kilsyth
So in my case it would read
βWeather Forecast for Kilsythβ
Instead of just βWeather Forecastβ
Sounds great. Here is what I have been working on so far with some more to go. I have added icons as well.
Help! My logs are filling up with all these debug messages. How can I turn this off?
The weather tile's logging is turned off.
Sorry about that, Iβll fix it today.
Looks awesome, are you using a custom tile generator to make it?
Ok, v6.2.0 has just been released:
v6.2.0 - Improved formatting, fixed debug logging and added Station Location to the Tiles
Can you please try v6.2.0 - I couldn't replicate your specific issue, but I have fixed the logging so HTML debug logging only occurs when you enable debug logging.
No, just adding to your driver code. Didn't see that you were also making changes so I will take a look at your changes before going further.
Didn't see that you were also making changes so I will take a look at your changes before going further.
If you would like me to add your tile into the driver, I'd be happy to. I'm sure others would like it too.
I'm not a developer, just someone with enough knowledge to be dangerous.
Can you please try v6.2.0
Updated to latest code but still getting error (at exactly midnight):