I wonder, if it is possible to setup a device, which shows up as window in Google Home. Problem here is, that the window device type is supported by Google Home, but does not appear in the list of standard devices for Rainmaker. I then looked up the window device in the Google Docs (https://developers.home.google.com/clou ... des/window) and found out, that it needs to send the param openPercent for the command OpenClose. So I tried to rebuild this with a custom window device:
Code: Select all
static Device window("Window", "esp.device.window", NULL);
Code: Select all
window.addNameParam();
Param window_state_param("openPercent", "esp.param.OpenClose", value(0), PROP_FLAG_READ | PROP_FLAG_WRITE);
window_state_param.addBounds(value(0), value(100), value(1));
window_state_param.addUIType(ESP_RMAKER_UI_SLIDER);
window.addParam(window_state_param);
window.assignPrimaryParam(window.getParamByName("openPercent"));
Regards, woermi