Add "Offline" state to devices (things)

At present, majority of Things have 1 or 2 states (eg On/Off). For my deployment, it is often very important to know if particular device is Offline (eg not connected, not monitoring).

Consider, for example, a motion sensor, I would like it to have 3 states (with associated icons, styles, etc)

  1. Inactive - means “connected, but detecting no movement”
  2. Active - means “connected and movement detected”
  3. Offline - the sensor is not connected and not reporting. It might be Active it might be Inactive - there is no way of knowing

Observe the difference between (1) and (3). (1) means “I positively report you no movement is detected”, (3) means - “device is offline, so I do not know, a herd of elephants might be passing by”