Correction for forecastIcon and weatherIcon to use the 'standard' legacy WU codes that most dashboards use.
Tweaked lux (illumination) for 'fully nighttime' to force it to 5 lux with no further cloudCover adjustments (it was setting to 5 and then further adjusting for cloudCover after that before).
First, the driver does not work like you think. It makes one data query to Dark Sky to retrieve the data then any conversions to other 'units' are done within the driver. There is some flexibility on the units returned that are specified when the query is made, but you have to choose a pre-determined unit set that Dark Sky offers. My drivers use the pre-determined US/English default set when requesting data from Dark Sky and any options presented in the driver that differs from those are conversion calculations to those units performed within the driver.
Given that, I should be able to provide wind as 'm/s' as 1 mph is equal to 0.44704 meter/second. The driver already provides millibars as an option for pressure. That 'conversion' would be 1 hectopascal = 1 millibar (or no conversion because they are equal), so what you are asking is just to have an additional option on the label to say 'hPa' instead of 'MBAR' even though the number reported would be the same for both? I will take a look but if that is anything more than a trivial addition then I may not accomodate that request.
With this, is it possible to get a forcast for today and one for tomorrow? I really don't need much info (dont need windspeed, humidity etc). Just maybe if its going to be a sunny or rainy day (maybe with temperature).
'Today' forecast is what is shown from Dark Sky. The data elements 'tomorrow' or after are available from Dark Sky, but not exposed in this driver. The driver does expose percent chance of precipitation for 'tomorrow' and 'day after tomorrow', but no other forecast data for those periods.
I can be done ... just create your own tile attribute in the driver code to expose what you want. There are lots of drivers you could use as examples, including this driver's 'myTile' code.
It is formatted as a string value in the code. Depending on your 'Units' selection is could be:
hPa or MBAR: String.format("%,4.1f", getDataValue("pressure").toBigDecimal())
inHg: String.format("%2.2f", getDataValue("pressure").toBigDecimal())
If you need it to be a number you would have to convert it.
Yes, it does. (unfortunately I am not able to post imagens here yet)
I don't need this as a number, having it as a string is enough to me. My problem is that when I try to set a global variable to pressure value, it returns "null" and I don't know why. Have you tried to use pressure data into a global variable successfully?
Thanks
I don't do much (anything really) with Global Variables in Rule Machine .... so I don't think I can help you. It sounds like a Rule Machine usage issue, not a Dark Sky driver issue.