Merge pull request #9454 from s-hadinger/zigbee_trv_ui

Zigbee add TRV to UI
This commit is contained in:
s-hadinger 2020-10-02 22:40:40 +02:00 committed by GitHub
commit b63a7302f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 1 deletions

View File

@ -1432,16 +1432,26 @@ void ZigbeeShow(bool json)
// Sensors // Sensors
bool temperature_ok = device.validTemperature(); bool temperature_ok = device.validTemperature();
bool tempareture_target_ok = device.validTemperatureTarget();
bool th_setpoint_ok = device.validThSetpoint();
bool humidity_ok = device.validHumidity(); bool humidity_ok = device.validHumidity();
bool pressure_ok = device.validPressure(); bool pressure_ok = device.validPressure();
if (temperature_ok || humidity_ok || pressure_ok) { if (temperature_ok || tempareture_target_ok || th_setpoint_ok || humidity_ok || pressure_ok) {
WSContentSend_P(PSTR("<tr class='htr'><td colspan=\"4\">&#9478;")); WSContentSend_P(PSTR("<tr class='htr'><td colspan=\"4\">&#9478;"));
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);
WSContentSend_PD(PSTR(" &#x2600;&#xFE0F; %s°C"), buf); WSContentSend_PD(PSTR(" &#x2600;&#xFE0F; %s°C"), buf);
} }
if (tempareture_target_ok) {
char buf[12];
dtostrf(device.temperature_target / 10.0f, 3, 1, buf);
WSContentSend_PD(PSTR(" &#127919; %s°C"), buf);
}
if (th_setpoint_ok) {
WSContentSend_PD(PSTR(" &#9881;&#65039; %d%%"), device.th_setpoint);
}
if (humidity_ok) { if (humidity_ok) {
WSContentSend_P(PSTR(" &#x1F4A7; %d%%"), device.humidity); WSContentSend_P(PSTR(" &#x1F4A7; %d%%"), device.humidity);
} }