|
|
@ -82,6 +82,7 @@ void MainControlService::processReceiveMessage(fromwhere_t fromwhere, const json |
|
|
|
SET_DEVICE_STATE("atmospheric_pressure", env.atmospheric_pressure, "hPa"); |
|
|
|
SET_DEVICE_STATE("tvoc", env.tvoc, "ppm"); |
|
|
|
SET_DEVICE_STATE("hcho", env.hcho, "mg/m³"); |
|
|
|
SET_DEVICE_STATE("light_intensity", env.atmospheric_pressure, "lux"); |
|
|
|
SET_DEVICE_STATE("InterTemperature", m_deviceIOService->getInterTemperature(), "℃"); |
|
|
|
|
|
|
|
SET_DEVICE_STATE("fan1powerRate", m_deviceIOService->fanGetState(0), "%"); |
|
|
@ -141,6 +142,7 @@ void MainControlService::processReceiveMessage(fromwhere_t fromwhere, const json |
|
|
|
receipt["atmospheric_pressure"] = env.atmospheric_pressure; |
|
|
|
receipt["tvoc"] = env.tvoc; |
|
|
|
receipt["hcho"] = env.hcho; |
|
|
|
receipt["light_intensity"] = env.light_intensity; |
|
|
|
} else if (in["command"] == "fanGetState") { |
|
|
|
// int id = in["id"];
|
|
|
|
receipt["power"][0] = m_deviceIOService->fanGetState(0); |
|
|
|