EQ-3, Tado: Update thermostats windowOpenDetected states
The interface now distinguishes between states that are informative (read only) and ones that can be set.master
parent
4acddd2219
commit
3744ce040b
|
|
@ -66,7 +66,7 @@ void IntegrationPluginEQ3::discoverThings(ThingDiscoveryInfo *info)
|
||||||
|
|
||||||
connect(info, &QObject::destroyed, cubeDiscovery, &MaxCubeDiscovery::deleteLater);
|
connect(info, &QObject::destroyed, cubeDiscovery, &MaxCubeDiscovery::deleteLater);
|
||||||
|
|
||||||
connect(cubeDiscovery, &MaxCubeDiscovery::cubesDetected, info, [this, info, cubeDiscovery](const QList<MaxCubeDiscovery::CubeInfo> &cubeList){
|
connect(cubeDiscovery, &MaxCubeDiscovery::cubesDetected, info, [this, info](const QList<MaxCubeDiscovery::CubeInfo> &cubeList){
|
||||||
|
|
||||||
foreach (const MaxCubeDiscovery::CubeInfo &cube, cubeList) {
|
foreach (const MaxCubeDiscovery::CubeInfo &cube, cubeList) {
|
||||||
ThingDescriptor descriptor(cubeThingClassId, "Max! Cube LAN Gateway", cube.serialNumber);
|
ThingDescriptor descriptor(cubeThingClassId, "Max! Cube LAN Gateway", cube.serialNumber);
|
||||||
|
|
@ -200,9 +200,9 @@ void IntegrationPluginEQ3::setupThing(ThingSetupInfo *info)
|
||||||
thing->setStateValue(eqivaBluetoothTargetTemperatureStateTypeId, eqivaDevice->targetTemperature());
|
thing->setStateValue(eqivaBluetoothTargetTemperatureStateTypeId, eqivaDevice->targetTemperature());
|
||||||
});
|
});
|
||||||
// Window open state
|
// Window open state
|
||||||
thing->setStateValue(eqivaBluetoothWindowOpenStateTypeId, eqivaDevice->windowOpen());
|
thing->setStateValue(eqivaBluetoothWindowOpenDetectedStateTypeId, eqivaDevice->windowOpen());
|
||||||
connect(eqivaDevice, &EqivaBluetooth::windowOpenChanged, thing, [thing, eqivaDevice](){
|
connect(eqivaDevice, &EqivaBluetooth::windowOpenChanged, thing, [thing, eqivaDevice](){
|
||||||
thing->setStateValue(eqivaBluetoothWindowOpenStateTypeId, eqivaDevice->windowOpen());
|
thing->setStateValue(eqivaBluetoothWindowOpenDetectedStateTypeId, eqivaDevice->windowOpen());
|
||||||
});
|
});
|
||||||
// Valve open state
|
// Valve open state
|
||||||
thing->setStateValue(eqivaBluetoothValveOpenStateTypeId, eqivaDevice->valveOpen());
|
thing->setStateValue(eqivaBluetoothValveOpenStateTypeId, eqivaDevice->valveOpen());
|
||||||
|
|
|
||||||
|
|
@ -611,9 +611,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "dcacdacc-ee47-43b0-9fef-1fe423e4f355",
|
"id": "dcacdacc-ee47-43b0-9fef-1fe423e4f355",
|
||||||
"name": "windowOpen",
|
"name": "windowOpenDetected",
|
||||||
"displayName": "Window open detected",
|
"displayName": "Window open detected",
|
||||||
"displayNameEvent": "Window open changed",
|
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -432,7 +432,7 @@ void IntegrationPluginTado::onZoneStateReceived(const QString &homeId, const QSt
|
||||||
thing->setStateValue(zoneTargetTemperatureStateTypeId, state.settingTemperature);
|
thing->setStateValue(zoneTargetTemperatureStateTypeId, state.settingTemperature);
|
||||||
thing->setStateValue(zoneTemperatureStateTypeId, state.temperature);
|
thing->setStateValue(zoneTemperatureStateTypeId, state.temperature);
|
||||||
thing->setStateValue(zoneHumidityStateTypeId, state.humidity);
|
thing->setStateValue(zoneHumidityStateTypeId, state.humidity);
|
||||||
thing->setStateValue(zoneWindowOpenStateTypeId, state.windowOpen);
|
thing->setStateValue(zoneWindowOpenDetectedStateTypeId, state.windowOpen);
|
||||||
thing->setStateValue(zoneTadoModeStateTypeId, state.tadoMode);
|
thing->setStateValue(zoneTadoModeStateTypeId, state.tadoMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,15 @@
|
||||||
#ifndef INTEGRATIONPLUGINTADO_H
|
#ifndef INTEGRATIONPLUGINTADO_H
|
||||||
#define INTEGRATIONPLUGINTADO_H
|
#define INTEGRATIONPLUGINTADO_H
|
||||||
|
|
||||||
#include "plugintimer.h"
|
|
||||||
#include "integrations/integrationplugin.h"
|
|
||||||
#include "network/oauth2.h"
|
|
||||||
#include "tado.h"
|
#include "tado.h"
|
||||||
|
#include "extern-plugininfo.h"
|
||||||
|
|
||||||
|
#include <plugintimer.h>
|
||||||
|
#include <integrations/integrationplugin.h>
|
||||||
|
#include <network/oauth2.h>
|
||||||
|
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
class IntegrationPluginTado : public IntegrationPlugin
|
class IntegrationPluginTado : public IntegrationPlugin
|
||||||
|
|
|
||||||
|
|
@ -117,9 +117,8 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "c7a04e26-bb22-406e-b117-262bdb8b9c0e",
|
"id": "c7a04e26-bb22-406e-b117-262bdb8b9c0e",
|
||||||
"name": "windowOpen",
|
"name": "windowOpenDetected",
|
||||||
"displayName": "Window open",
|
"displayName": "Window open detected",
|
||||||
"displayNameEvent": "Window open changed",
|
|
||||||
"type": "bool",
|
"type": "bool",
|
||||||
"defaultValue": false
|
"defaultValue": false
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue