mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-29 05:36:39 +00:00
Merge pull request #9387 from s-hadinger/zigbee_ui_tr
Zigbee UI: fix line height to 20px
This commit is contained in:
commit
8a849ffb05
@ -1357,6 +1357,7 @@ void ZigbeeShow(bool json)
|
|||||||
".ztd td:not(:first-child){width:20px;font-size:70%%}"
|
".ztd td:not(:first-child){width:20px;font-size:70%%}"
|
||||||
".ztd td:last-child{width:45px}"
|
".ztd td:last-child{width:45px}"
|
||||||
".ztd .bt{margin-right:10px;}" // Margin right should be half of the not-first width
|
".ztd .bt{margin-right:10px;}" // Margin right should be half of the not-first width
|
||||||
|
".htr{line-height:20px}"
|
||||||
// Lighting
|
// Lighting
|
||||||
".bx{height:14px;width:14px;display:inline-block;border:1px solid currentColor;background-color:var(--cl,#fff)}"
|
".bx{height:14px;width:14px;display:inline-block;border:1px solid currentColor;background-color:var(--cl,#fff)}"
|
||||||
// Signal Strength Indicator
|
// Signal Strength Indicator
|
||||||
@ -1406,7 +1407,7 @@ void ZigbeeShow(bool json)
|
|||||||
}
|
}
|
||||||
|
|
||||||
WSContentSend_PD(PSTR(
|
WSContentSend_PD(PSTR(
|
||||||
"<tr class='ztd'>"
|
"<tr class='ztd htr'>"
|
||||||
"<td><b>%s</b></td>" // name
|
"<td><b>%s</b></td>" // name
|
||||||
"<td>%s</td>" // sbatt (Battery Indicator)
|
"<td>%s</td>" // sbatt (Battery Indicator)
|
||||||
"<td><div title='" D_LQI " %s' class='ssi'>" // slqi
|
"<td><div title='" D_LQI " %s' class='ssi'>" // slqi
|
||||||
@ -1435,7 +1436,7 @@ void ZigbeeShow(bool json)
|
|||||||
bool pressure_ok = device.validPressure();
|
bool pressure_ok = device.validPressure();
|
||||||
|
|
||||||
if (temperature_ok || humidity_ok || pressure_ok) {
|
if (temperature_ok || humidity_ok || pressure_ok) {
|
||||||
WSContentSend_P(PSTR("<tr><td colspan=\"4\">┆"));
|
WSContentSend_P(PSTR("<tr class='htr'><td colspan=\"4\">┆"));
|
||||||
if (temperature_ok) {
|
if (temperature_ok) {
|
||||||
char buf[12];
|
char buf[12];
|
||||||
dtostrf(device.temperature / 10.0f, 3, 1, buf);
|
dtostrf(device.temperature / 10.0f, 3, 1, buf);
|
||||||
@ -1456,7 +1457,7 @@ void ZigbeeShow(bool json)
|
|||||||
if (power_ok) {
|
if (power_ok) {
|
||||||
uint8_t channels = device.getLightChannels();
|
uint8_t channels = device.getLightChannels();
|
||||||
if (0xFF == channels) { channels = 5; } // if number of channel is unknown, display all known attributes
|
if (0xFF == channels) { channels = 5; } // if number of channel is unknown, display all known attributes
|
||||||
WSContentSend_P(PSTR("<tr><td colspan=\"4\">┆ %s"), device.getPower() ? PSTR(D_ON) : PSTR(D_OFF));
|
WSContentSend_P(PSTR("<tr class='htr'><td colspan=\"4\">┆ %s"), device.getPower() ? PSTR(D_ON) : PSTR(D_OFF));
|
||||||
if (device.validDimmer() && (channels >= 1)) {
|
if (device.validDimmer() && (channels >= 1)) {
|
||||||
WSContentSend_P(PSTR(" 🔅 %d%%"), changeUIntScale(device.dimmer,0,254,0,100));
|
WSContentSend_P(PSTR(" 🔅 %d%%"), changeUIntScale(device.dimmer,0,254,0,100));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user