Hello,
Is it possible to change the text color of a temperature block when another block changes status in Dashticz?
I display the temperature of the living room in white, when the boiler starts heating I want the text color to change from white to red.
I have already tried a few things in the custom.js file, but I am not getting a good result.
I hope someone can help me with this,
Corné
Dashticz change temperature text color
Moderators: leecollings, remb0
-
- Posts: 19
- Joined: Sunday 10 November 2019 19:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Dashticz change temperature text color
>>Raspberry Pi 4<<>>Raspberry Pi 3 + 7-inch Touchscreen<<>>Ikea Tradfri<<>>Nefit Easy<<>>ESP-Easy<<>>Netatmo<<>>Sonos<<
- HansieNL
- Posts: 957
- Joined: Monday 28 September 2015 15:13
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Dashticz change temperature text color
An example if device 123 is on change color of col-data of device 234 to red.
custom.js:
custom.css:
custom.js:
Code: Select all
function afterGetDevices(){
if (alldevices[123].Data == 'On') {
$('.block_234 .col-data').addClass('textred');
}
else {
$('.block_234 .col-data').removeClass('textred');
}
}
Code: Select all
.textred {
color: red !important;
}
Blah blah blah
-
- Posts: 19
- Joined: Sunday 10 November 2019 19:10
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Contact:
Re: Dashticz change temperature text color
@HansieNL
Thanks, it works.
This code is even simpler than what I was trying
Thanks, it works.
This code is even simpler than what I was trying
>>Raspberry Pi 4<<>>Raspberry Pi 3 + 7-inch Touchscreen<<>>Ikea Tradfri<<>>Nefit Easy<<>>ESP-Easy<<>>Netatmo<<>>Sonos<<
Who is online
Users browsing this forum: No registered users and 1 guest