Home Elements Boards Recipes

Time Element

The time element creates actions with the current local time as value.

When using this element a real time retrieving element must be configured as well like the NTPTime , DSTime or DCFTime.

There are four different kind of actions supported that have different values and occur on different situations.

The purpose of this element this for example to show the local time on the display.

Element Configuration

The following properties are available for configuration of the element:

ontime – Actions. These actions are emitted when the time of day value has changed. The value contains the full time including the seconds using the format hh:mm:ss

onminute – Actions. These actions are emitted when the time of day value has changed. The value contains the time of the day including hour and minute but no seconds using the format hh:mm

ondate – Actions. These actions are emitted when the date value has changed. The value contains the full date without the time using the format YYYYY-MM-DD

ontimestamp – Actions. These actions are emitted every second with the full timestamp as value using the format YYYYY-MM-DD hh:mm:ss

From the base element implementation the following properties are available for configuration:

title – Caption text for the element. Used by the element specific cards on the dash boards.

description – A line of text that gives a short description of the device used in the web UI.

room – The location of the device.

loglevel – This property holds the element specific log level. The default value is LOGGER_LEVEL_ERR == 1.

startup – This property can be used to start the element using a different initialization phase. Possible values are “sys”, “net”, “time”. See The Startup sequence.

Element State

The following properties are available with the current values at runtime

active - Is set to true when the element is active.

Example Configuration

{
  "time": {
    "clock": {
      "ontime": "displaytext/time?value=$v"
    }
  }
}

Example State

{
  "time/0": {
    "active":"true"
  }
}

See also

Tags

Element Time