Denon: fixed reboot

This commit is contained in:
bernhard.trinnes 2020-03-25 22:46:05 +01:00
parent ac27c2b8d3
commit 538e59f68b
2 changed files with 3 additions and 4 deletions

View File

@ -37,7 +37,7 @@
#include <QUrlQuery> #include <QUrlQuery>
#include <QTimer> #include <QTimer>
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
#include <QRandromGenerator> #include <QRandomGenerator>
#endif #endif
Heos::Heos(const QHostAddress &hostAddress, QObject *parent) : Heos::Heos(const QHostAddress &hostAddress, QObject *parent) :

View File

@ -311,9 +311,8 @@ void IntegrationPluginDenon::executeAction(ThingActionInfo *info)
return info->finish(Thing::ThingErrorActionTypeNotFound); return info->finish(Thing::ThingErrorActionTypeNotFound);
} else if (thing->thingClassId() == heosThingClassId) { } else if (thing->thingClassId() == heosThingClassId) {
Thing *heosThing = myThings().findById(thing->parentId()); Heos *heos = m_heosConnections.value(thing->id());
Heos *heos = m_heosConnections.value(heosThing->id()); if (action.actionTypeId() == heosRebootActionTypeId) {
if (action.actionTypeId() == heosPlayerAlertActionTypeId) {
heos->rebootSpeaker(); heos->rebootSpeaker();
return info->finish(Thing::ThingErrorNoError); return info->finish(Thing::ThingErrorNoError);
} }