fix battery interface implementation in philips hue
This commit is contained in:
parent
d8b84bae5b
commit
f07031e589
@ -550,7 +550,8 @@ void DevicePluginPhilipsHue::remoteStateChanged()
|
|||||||
}
|
}
|
||||||
|
|
||||||
device->setStateValue(hueRemoteConnectedStateTypeId, remote->reachable());
|
device->setStateValue(hueRemoteConnectedStateTypeId, remote->reachable());
|
||||||
device->setStateValue(hueRemoteBatteryStateTypeId, remote->battery());
|
device->setStateValue(hueRemoteBatteryLevelStateTypeId, remote->battery());
|
||||||
|
device->setStateValue(hueRemoteBatteryCriticalStateTypeId, remote->battery() < 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DevicePluginPhilipsHue::onRemoteButtonEvent(const int &buttonCode)
|
void DevicePluginPhilipsHue::onRemoteButtonEvent(const int &buttonCode)
|
||||||
|
|||||||
@ -527,15 +527,22 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "683e493a-9796-4d5e-b0e3-61cb178d5819",
|
"id": "683e493a-9796-4d5e-b0e3-61cb178d5819",
|
||||||
"name": "battery",
|
"name": "batteryLevel",
|
||||||
"displayName": "battery",
|
"displayName": "battery",
|
||||||
"displayNameEvent": "battery changed",
|
"displayNameEvent": "battery changed",
|
||||||
"displayNameAction": "Set battery",
|
|
||||||
"type": "int",
|
"type": "int",
|
||||||
"unit": "Percentage",
|
"unit": "Percentage",
|
||||||
"defaultValue": 0,
|
"defaultValue": 0,
|
||||||
"minValue": 0,
|
"minValue": 0,
|
||||||
"maxValue": 100
|
"maxValue": 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "f8516899-6312-4110-bb97-70ffa81dc530",
|
||||||
|
"name": "batteryCritical",
|
||||||
|
"displayName": "battery critical",
|
||||||
|
"displayNameEvent": "battery critical changed",
|
||||||
|
"type": "bool",
|
||||||
|
"defaultValue": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"eventTypes": [
|
"eventTypes": [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user