joBr99 / nspanel-lovelace-ui

Custom Firmware for NsPanel with the design of HomeAssistant's lovelace UI in mind, works with Tasmota.
GNU General Public License v3.0
886 stars 191 forks source link

[BUG] Date time string does not fit on the US version in portrait (with no option to change size/date format) #1275

Closed dodancs closed 1 week ago

dodancs commented 1 week ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.

The US version of the NSPanel in portrait improperly displays the date/time string on the screensaver, causing it to be clipped: image

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!


nspanel-1: module: nspanel-lovelace-ui class: NsPanelLovelaceUIManager config: panelRecvTopic: "tele/tasmota_549F38/RESULT" panelSendTopic: "cmnd/tasmota_549F38/CustomSend" model: us-p sleepTimeout: 20 sleepBrightness:



### TO REPRODUCE
_Steps to reproduce the behavior:_

- Buy the Sonoff NSPanel US version
- Install lovelace-ui
- Power it up

### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._

The date/time should scale automatically, or there should be a way to change the font size manually, or change the date/time format to include short day names or month names, so the text would fit.

### SCREENSHOTS
_If applicable, add screenshots/pictures to help explain your problem._

![image](https://github.com/user-attachments/assets/2d2362e4-6262-45bf-ad91-ca5e51c29084)

### ADDITIONAL CONTEXT
_Add any other context about the problem here._
_Please note here in case you are using ioBroker_

### PANEL / FIRMWARE VERSION
_Please add the Panel/Firmware Version you are using (EU, US-L or US-P)_

NSPanel US-P
Tasmota 14.2.0 (release-tasmota32)
joBr99 commented 1 week ago

Hey, you can configure your own date format with dateFormat or dateFromatBabel (if you've that installed)

https://docs.nspanel.pky.eu/stable/config-overview/?h=date

This allows you to configure weekday and or month with short names. (%a and/or %b in the case without babel)

https://docs.python.org/3/library/datetime.html

dodancs commented 1 week ago

Hey, you can configure your own date format with dateFormat or dateFromatBabel (if you've that installed)

https://docs.nspanel.pky.eu/stable/config-overview/?h=date

This allows you to configure weekday and or month with short names. (%a and/or %b in the case without babel)

https://docs.python.org/3/library/datetime.html

Many thanks! Adding dateFormat to the config entry allowed me to make it a custom date format:

  config:
    model: us-p
    dateFormat: "%A, %d.%m.%Y"