poll hue lights using the guhTimer to keep them in sync
This commit is contained in:
parent
aaaafb7f39
commit
4211c3ae5c
@ -160,7 +160,7 @@ QList<DeviceClass> DevicePluginPhilipsHue::supportedDevices() const
|
|||||||
|
|
||||||
DeviceManager::HardwareResources DevicePluginPhilipsHue::requiredHardware() const
|
DeviceManager::HardwareResources DevicePluginPhilipsHue::requiredHardware() const
|
||||||
{
|
{
|
||||||
return DeviceManager::HardwareResourceNone;
|
return DeviceManager::HardwareResourceTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DevicePluginPhilipsHue::startMonitoringAutoDevices()
|
void DevicePluginPhilipsHue::startMonitoringAutoDevices()
|
||||||
@ -267,6 +267,13 @@ QPair<DeviceManager::DeviceSetupStatus, QString> DevicePluginPhilipsHue::confirm
|
|||||||
return reportDeviceSetup(DeviceManager::DeviceSetupStatusAsync);
|
return reportDeviceSetup(DeviceManager::DeviceSetupStatusAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DevicePluginPhilipsHue::guhTimer()
|
||||||
|
{
|
||||||
|
foreach (Light *light, m_lights.keys()) {
|
||||||
|
light->refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QPair<DeviceManager::DeviceError, QString> DevicePluginPhilipsHue::executeAction(Device *device, const Action &action)
|
QPair<DeviceManager::DeviceError, QString> DevicePluginPhilipsHue::executeAction(Device *device, const Action &action)
|
||||||
{
|
{
|
||||||
qDebug() << "Should execute action in hue plugin";
|
qDebug() << "Should execute action in hue plugin";
|
||||||
|
|||||||
@ -52,6 +52,8 @@ public:
|
|||||||
|
|
||||||
QPair<DeviceManager::DeviceSetupStatus, QString> confirmPairing(const QUuid &pairingTransactionId, const DeviceClassId &deviceClassId, const QList<Param> ¶ms) override;
|
QPair<DeviceManager::DeviceSetupStatus, QString> confirmPairing(const QUuid &pairingTransactionId, const DeviceClassId &deviceClassId, const QList<Param> ¶ms) override;
|
||||||
|
|
||||||
|
void guhTimer() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
QPair<DeviceManager::DeviceError, QString> executeAction(Device *device, const Action &action);
|
QPair<DeviceManager::DeviceError, QString> executeAction(Device *device, const Action &action);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user