[RELEASE] Formatted Date and Time on Dashboard Tiles

Now you can select the attribute on the right hand side (pick an attribute).

but here nothing comes out of the day or time

Hmmm, ok, I see what you mean.

You may need to refresh the device back in the device edit page, but I'm not sure... May need to look at it later today and get back to you.

Hi @diegodelprat,

Back home now and I can see when you setup the virtual device initially the attributes that store the formatted date/time are not populated. In my opinion this is still the desireable situation after having setup the device, I don't want to store a static value from when the device is created, nor do I want to setup a scheduled refresh without giving users the opportunity to choose that option.

In terms of your situation, does your device edit screen for the date/time device look something like this, with nothing shown under "Current States", displayed on the right hand side of the screen?

If so, to create the attributes for your dashboard, you can either hit the Refresh button under the Commands section of the screen to create / update the attributes once manually, or use the recommended setup by clicking the Save Preferences button to enable the automatic updates of the device, making sure you have the "Automatic Update" preference turned on and the "Auto Update Interval" set to your preferred refresh frequency in seconds. Once either of these have taken effect, you should see the attributes appear under the Current States section.

These should then be available for you to select when adding a new tile to your dashboard, having selected the virtual device and the attribute template.

Let me know if this helps....

I will add these and some other notes to the Readme in my Git repository for others to refer to.

Simon

I already got it friend, thank you very much

1 Like

How do i change to 12hr format instead of 24hr format?

Nevermind figured it out.

Time Format
Enter the time format to apply for display purposes
instead of HH:mm:ss just H:mm:ss
That gave me the 12hr format

but the seconds only update in intervals of 30 seconds so im taking the seconds off.

1 Like

Yeah, the removal of the seconds was part of what I personally wanted this for, as the standard date / time elements on the dashboard included these, when I really only needed the hours and minutes. I'll try and find a reasonable online resource for examples of date / time formats.

1 Like

Hey, so this seems to fix the issue with having the dashboard time/date tile changing to whatever time zone the phone is in when viewing, but it still doesn't change all the tile histories to be fixed in the hub time zone. does anyone know if there is a way to do that yet?
My main reason for having a dashboard clock is to be able to see the hub time and compare with when events should happen and the tile history...

Probably worth requesting this of the HE developers. This driver only stores a string representation of a date/time, but I would not expect we can have too much control over the display of the device history pages.

It looks like there are a ton of forums and threads. Any advice for the best, direct way to request such a thing from the HE team? I'm new on HE and this forum just a week or so ago and still finding my way around...
Thanks!

Sorry, I did mean to come back to you on this.

Typically people just setup a new thread (topic) here on the Community usually with [FEATURE REQUEST] at the start of the title and with a Category of Feature Request:

Just started a new thread per your advice. Thank you!

1 Like

Small update thanks to @luarmr to reduce the chat on the websocket, introducing a check for a change in the date time, only applying an update when a change has occurred. Thanks for the continued support @luarmr.

1 Like

@luarmr I like your date & time, how did you get it like that ? Is that with extra CSS code ??

Screenshot from 2023-03-06 20-06-04

@AndyR Yeah, here is some screenshots:

Screenshot 2023-03-06 at 5.54.57 PM

Notice the width 2

Applying this css:

#tile-0 {
  background: transparent;
  display: block;
  width: 100%;
}
#tile-0 .tile-title {
  display: none;
}
#tile-0 .tile-edit {
  display: none;
}
#tile-0:hover {
  background: rgba(255, 0, 0, 0.3);
}
#tile-0:hover .tile-edit {
  display: block;
}
#tile-0 .timeFormat {
  display: block;
  font-size: 5em;
  margin-bottom: -20px;
}
#tile-0 .dateFormat {
  display: block;
  font-size: 1.7em;
}
#tile-0 .tile-secondary{
  display: none;
}

you have this effect:

I just tested it in a new dashboard to be sure it works :slight_smile:

You may want to put the size a little smaller. I remove some overflow:hidden; in the tiles, but it can get messy.

1 Like

@luarmr brilliant thanks for that works a treat. I could not get time & date on different lines. All good now.

Cheers

1 Like

In keeping up with @jshimota 's date/time parser driver :slight_smile: , I have added an isDSTActive attribute to this driver, indicating if the time zone is currently in daylight savings time.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.