Differentiate between LED-Device Enable/Disable and Switch On/Off (#960)

* Switch Off devices, when no input source

* Realign Enable/SwitchOn, Disable/SwitchOff

* Align to updated LedDevice-Flow

* Remove debug statements slipped in

* Send last color update after enabling again

* Fix WLED getProperties API call

* Remove unused signals

* LedDevice process flow documentation

* LedDevice process flow documentation

Co-authored-by: Paulchen Panther <16664240+Paulchen-Panther@users.noreply.github.com>
This commit is contained in:
LordGrey
2020-09-14 17:19:14 +02:00
committed by GitHub
parent fbd8167458
commit 4aabe175cd
15 changed files with 247 additions and 146 deletions

View File

@@ -215,15 +215,10 @@ QJsonObject LedDeviceWled::getProperties(const QJsonObject& params)
apiPort = API_DEFAULT_PORT;
}
if ( filter.startsWith("/") )
filter.remove(0,1);
initRestAPI(apiHost, apiPort);
_restApi->setPath(API_PATH_INFO);
_restApi->setPath(filter);
// Perform request
// TODO: WLED::getProperties - Check, if filter is supported
httpResponse response = _restApi->put(filter);
httpResponse response = _restApi->get();
if ( response.error() )
{
Warning (_log, "%s get properties failed with error: '%s'", QSTRING_CSTR(_activeDeviceType), QSTRING_CSTR(response.getErrorReason()));