show timestamp for event not event

Begonnen von andyclimb, 07 Mai 2017, 22:00:49

Vorheriges Thema - Nächstes Thema

andyclimb

How can I display the timestamp as stateformat rather than the event itself?
AM

amenomade

attr <device> stateFormat {ReadingsTimestamp('<device>','state','')}
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

justme1968

or if your fhem is current:attr <device> stateFormat [$name:state:t]
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

andyclimb

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?
AM

justme1968

yes. correct.

are you sure your fhem is current? this feature has been added just a few weeks ago.
hue, tradfri, alexa-fhem, homebridge-fhem, LightScene, readingsGroup, ...

https://github.com/sponsors/justme-1968

rudolfkoenig

Some modules support the showtime attribute: if set, FHEMWEB displays the timestamp of the state reading.