Hi,
I'm playing with text dummies.
Is it possible to have a text dummy without an icon. Set it to None.
Text Dummy without Icon
Moderator: leecollings
-
- Posts: 615
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Text Dummy without Icon
Bugs bug me.
- RonkA
- Posts: 115
- Joined: Tuesday 14 June 2022 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2025.1
- Location: Harlingen
- Contact:
Re: Text Dummy without Icon
Not the answer you would like but to get the lines to start in the same column I use 'empty' caracters from the Times New Roman font like ' ' to add extra 'empty' caracters to textdevices because Domoticz removes the normal extra spaces.
Maybe add 8 or 9 of these 'empty' caracters to the lines below the icon to get all the lines to allign as the lines beside the icon ?
Copy/paste this one or lookup another in 'speciale tekens' in windows like 'U+2002'('special characters' in Dutch)
Question; how do you set the colour of the text via dzVents?
Maybe add 8 or 9 of these 'empty' caracters to the lines below the icon to get all the lines to allign as the lines beside the icon ?
Copy/paste this one or lookup another in 'speciale tekens' in windows like 'U+2002'('special characters' in Dutch)
Question; how do you set the colour of the text via dzVents?
SolarEdge ModbusTCP - Kaku - Synology NAS - Watermeter - ESPEasy - DS18b20
Work in progress = Life in general..
Work in progress = Life in general..
- habahabahaba
- Posts: 233
- Joined: Saturday 18 March 2023 14:44
- Target OS: Windows
- Domoticz version: 2024.4
- Contact:
Re: Text Dummy without Icon
Code: Select all
local device = domoticz.devices(40) -- your text device
local text = 'Some text'
local style = '<span style="color: red;">' .. text .. '</span>'
device.updateText(style)
-
- Posts: 615
- Joined: Sunday 01 November 2015 22:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Twente
- Contact:
Re: Text Dummy without Icon
I'm using simple HTML.
Code: Select all
domoticz.devices('Energie').updateText('Gas today      ' .. tostring(domoticz.devices('Gas').counterToday) ..
'\n Gas yesterday    ' .. tostring(domoticz.devices('Gas gisteren').sensorValue) ..
'\n Gas the day before  ' .. tostring(domoticz.devices('Gas eergisteren').sensorValue) ..
'\n \n <font color="red"> Power used today     ' .. tostring(domoticz.devices('Power').counterToday) .. '</font> '..
'\n       <font color="red">Power consumption now  ' .. tostring(domoticz.devices('Power').rawData[5] .. '</font> ') ..
'\n \n       <font color="green">Power returned today   ' .. tostring(domoticz.devices('Power').counterDeliveredToday) ..'</font> '..
'\n       <font color="green">Power return now     ' .. tostring(domoticz.devices('Power').rawData[6] .. '</font> \n  ')
)
domoticz.log("Hello world, from " .. _VERSION .. "!\n")
Bugs bug me.
- habahabahaba
- Posts: 233
- Joined: Saturday 18 March 2023 14:44
- Target OS: Windows
- Domoticz version: 2024.4
- Contact:
Re: Text Dummy without Icon
So... No way to remove icon?
- jvdz
- Posts: 2330
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Text Dummy without Icon
Don't think it is optional in the standard webfrontend:
Code: Select all
else if (item.SubType == "Text") {
item.Image = (item.CustomImage == 0) ? 'text48.png' : item.Image + '48_On.png';
xhtm += '<img src="images/' + item.Image + '" height="48" width="48"></td>\n';
status = item.Data.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, '$1<br />$2');
}
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- jvdz
- Posts: 2330
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: Text Dummy without Icon
This is the actual current code in the webpage of Domoticz standard frontend, which shows that text sensors always show an ICON!
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Who is online
Users browsing this forum: No registered users and 1 guest