Fix/Workaround set-music error when music is already off (#1379)

* Fix/Workaround set-music error when music is already off

* Do not ignore error when setting music mode
This commit is contained in:
LordGrey
2021-12-14 07:54:53 +01:00
committed by GitHub
parent a0d4efc10d
commit 442fab9c59
3 changed files with 41 additions and 14 deletions

View File

@@ -151,18 +151,20 @@ public:
/// @brief Execute a Yeelight-API command
///
/// @param[in] command The API command request in JSON
/// @param[in] ignoreErrors Return success, even if errors occured
/// @return 0: success, -1: error, -2: command quota exceeded
///
int writeCommand( const QJsonDocument &command );
int writeCommand( const QJsonDocument &command, bool ignoreErrors = false );
///
/// @brief Execute a Yeelight-API command
///
/// @param[in] command The API command request in JSON
/// @param[out] result The response to the command in JSON
/// @param[in] ignoreErrors Return success, even if errors occured
/// @return 0: success, -1: error, -2: command quota exceeded
///
int writeCommand( const QJsonDocument &command, QJsonArray &result );
int writeCommand( const QJsonDocument &command, QJsonArray &result, bool ignoreErrors = false );
///
/// @brief Stream a Yeelight-API command