[OBSOLETE] Log events to Google Sheets [see post /36719/154 for Github repo and v1.1]

I’m not applying any special formatting to the data, and most of my data is numbers. The default format seems to work, so I guess I’d need an example to understand better.

[quote=“RedKnight, post:164, topic:36719”]
5.RENAME SENSORS?
So the spreadsheet columns aren’t so wide, I would like to shorten…
This isn’t an issue that wrapping can help with, not the way I like to do it.[/quote]
Funny, I was about to ask for a device alias mechanism for the Ask Alexa SmartApp for much the same reason. I’d like to ask/set devices without speaking the long names.

However, I think you might be able to use wrapping to solve most of this. This is a snippet of my spreadsheet. I’ve just set row 1 to wrap text and then narrowed the columns as they got created. Yes, they could all be narrower if the words were abbreviated. But, IMHO I don’t think the end-goal is to view the data in the spread sheet; instead, I think the end goal is to store it there but then use graphs to visualize things. With that you don’t need to worry about the column widths.

That said, you could try something like adding a new subroutine like this:

private def shortEvtName(evt) {
    String name = evt.name
    if (name == "temperature")
        return "temp"
    if (name == "illuminance")
        return "illum"
    if (name == "humidity")
        return "RH%"
    return name
}

and then replace the two instances of evt.name with shortEvtName(). I’ve not tested this, however, and were I really to add it, I’d probably add a preference to control it. But this might give you a starting point.

1 Like