Skip to content

TimeAgoProperty #75

@benfrancis

Description

@benfrancis

In WebThingsIO/zigbee-adapter#292 there's a request for a feature to show the user when a device was last seen, so that they know when a gateway exposing the Web Thing API for a web thing last had contact with the actual device.

I propose that new type of property schema be defined which provides a machine readable value like an ISO 8601 date stamp, an integer representing milliseconds past the epoch, or an integer representing a time period in milliseconds. This machine readable value can then be converted into a human-readable string like "3 hours ago" in a user interface.

I'm open to ideas on the naming. It would be nice if this could be more generic like "DateTimeProperty", but the request was specifically for a property to be displayed as a string like "3 hours ago", which wouldn't be obvious from such a generic type.

The more specific option LastSeenProperty would be a bit of a strange name to standardise because it wouldn't make sense for devices which host their own Thing Description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    propertyA request to create a new type of property

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions