Page 1 of 1

Incomplete text shown on dashboard

Posted: Tuesday 21 May 2024 15:45
by janpep
It looks to me that this has to do with design of the default theme.
In the example picture under tab Other, you see a longer text in a text device. You see it just goes to the next line.
Complete-Text-JanPep.png
Complete-Text-JanPep.png (13.74 KiB) Viewed 12510 times
When I loot at it under tab Dashboard, the visible text is Incomplete.
Incomplete-Text-JanPep.png
Incomplete-Text-JanPep.png (8.37 KiB) Viewed 12510 times
I almost assume this is a well-known phenomenon.
Apparently there is a difference in the processing in CSS.
Does anyone know the solution for this?

Re: Incomplete text shown on dashboard

Posted: Tuesday 21 May 2024 17:56
by HvdW
Your remark is correct.
You can solve your problem by using a text dummy sensor.
text.jpg
text.jpg (57.98 KiB) Viewed 12491 times
BTW Mine shows normal weather expectations and switches to weather alert text in case there is a weather alert.

Code: Select all

if (item.json.liveweer[1].alarm == '0') then
                    domoticz.devices('Weeralarm').switchOff()
                elseif (item.json.liveweer[1].alarm == '1') then
                    domoticz.devices('Weersverwachting').updateText(item.json.liveweer[1].alarmtxt)
                    domoticz.devices('Weeralarm').switchOn()
                end

Re: Incomplete text shown on dashboard

Posted: Tuesday 21 May 2024 18:10
by janpep
HvdW wrote: Tuesday 21 May 2024 17:56 You can solve your problem by using a text dummy sensor.text.jpg
I am using a dummy text device!
Please show me the same device on your dashboard.

Re: Incomplete text shown on dashboard

Posted: Tuesday 21 May 2024 19:08
by janpep
janpep wrote: Tuesday 21 May 2024 18:10 I am using a dummy text device!
Please show me the same device on your dashboard.
Sorry I did not say this correctly. What I showed was indeed an alert device.
I wanted to say that It also happens with a text device.
See in Utility
Complete-Text2-JanPep.png
Complete-Text2-JanPep.png (15.64 KiB) Viewed 12471 times
See in Dashboard
Incomplete-Text2-JanPep.png
Incomplete-Text2-JanPep.png (11.7 KiB) Viewed 12471 times
BTW. You mentioned your switching between normal weather expectations and weather alert text.
That may be userfull to you, but In fact it is about the text length. Not about the content.

Re: Incomplete text shown on dashboard

Posted: Wednesday 22 May 2024 10:34
by janpep
I guess I have found it.

Went digging in the CSS and found that is is set in in /pathtodomoticz/www/css/styles.css under .status.

Code: Select all

.status {
        white-space: nowrap;
}
This is what I saw:
TextWithoutWordwrap-JanPep.png
TextWithoutWordwrap-JanPep.png (11.6 KiB) Viewed 12436 times
I changed this in:

Code: Select all

.status {
        /* 22-05-2024 Jan peppink, Modified to get wordwrap on dashboard.*/
        /*white-space: nowrap;*/
        white-space: normal;
}
And now I see:
TextWithWordwrap-JanPep.png
TextWithWordwrap-JanPep.png (11.82 KiB) Viewed 12436 times
And that is exactly as I see it under the Utility tab.

After that I looked around and until now I did not see unwanted side effects. So in the meantime I'll leave it this way.
I guess a have to make a note to repeat this after updates.

Re: Incomplete text shown on dashboard

Posted: Monday 09 December 2024 10:09
by paul402
I have a long header for some alert boxes which are over written by the status
header.png
header.png (12.17 KiB) Viewed 11822 times
. I tried this approach but it had no affect on the header. Has something changed or am I looking in the wrong place?

Re: Incomplete text shown on dashboard

Posted: Monday 09 December 2024 14:01
by waltervl
paul402 wrote: Monday 09 December 2024 10:09 I have a long header for some alert boxes which are over written by the statusheader.png. I tried this approach but it had no affect on the header. Has something changed or am I looking in the wrong place?
I do not know this X10 Security device type.
Normally the device name should be shortened by you manually as that is what you see in the header. This name should also not change by an integration. You can change the name by clicking on the edit button on the widget.
A status text is shown here (Normal) and that can change to another status by the integration.

Re: Incomplete text shown on dashboard

Posted: Monday 09 December 2024 16:01
by HvdW
In many cases you can edit the name of the sensor and it will still function.

Re: Incomplete text shown on dashboard

Posted: Friday 03 January 2025 19:24
by janpep
paul402 wrote: Monday 09 December 2024 10:09 I tried this approach but it had no affect on the header. Has something changed or am I looking in the wrong place?
For some reason I did not received the notification of new messages. So I have missed your post. Sorry for that!
Indeed the CSS change I posted is about the wordwrap in the 'body' text and not about the header.
As waltervl and HvdW suggested, it seems to me that it would be more desirable to shorten the name if possible.
Otherwise you should look into making the header multi-line, but I would not be so quick to go into that. You may then have to deal with unwanted effects in other places.