FHEM Forum

FHEM => English Corner => Thema gestartet von: andyclimb am 07 Mai 2017, 22:00:49

Titel: show timestamp for event not event
Beitrag von: andyclimb am 07 Mai 2017, 22:00:49
How can I display the timestamp as stateformat rather than the event itself?
Titel: Antw:show timestamp for event not event
Beitrag von: amenomade am 07 Mai 2017, 22:16:32
attr <device> stateFormat {ReadingsTimestamp('<device>','state','')}
Titel: Antw:show timestamp for event not event
Beitrag von: justme1968 am 07 Mai 2017, 22:28:31
or if your fhem is current:attr <device> stateFormat [$name:state:t]
Titel: Antw:show timestamp for event not event
Beitrag von: andyclimb am 07 Mai 2017, 22:35:04
Thanks guys.  I'm using the latest version. 

The ReadingsTimestamp works, but the other does not.


attr mqtt_motion stateFormat [$name:motion:t]


Have I got this right.  motion is the name of the reading?
Titel: Antw:show timestamp for event not event
Beitrag von: justme1968 am 07 Mai 2017, 22:38:39
yes. correct.

are you sure your fhem is current? this feature has been added just a few weeks ago.
Titel: Antw:show timestamp for event not event
Beitrag von: rudolfkoenig am 08 Mai 2017, 09:24:21
Some modules support the showtime attribute: if set, FHEMWEB displays the timestamp of the state reading.