diff --git a/philipshue/devicepluginphilipshue.cpp b/philipshue/devicepluginphilipshue.cpp index 70d4ae54..cc9e3c22 100644 --- a/philipshue/devicepluginphilipshue.cpp +++ b/philipshue/devicepluginphilipshue.cpp @@ -550,7 +550,8 @@ void DevicePluginPhilipsHue::remoteStateChanged() } 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) diff --git a/philipshue/devicepluginphilipshue.json b/philipshue/devicepluginphilipshue.json index 69d5165e..ec0f34ee 100644 --- a/philipshue/devicepluginphilipshue.json +++ b/philipshue/devicepluginphilipshue.json @@ -527,15 +527,22 @@ }, { "id": "683e493a-9796-4d5e-b0e3-61cb178d5819", - "name": "battery", + "name": "batteryLevel", "displayName": "battery", "displayNameEvent": "battery changed", - "displayNameAction": "Set battery", "type": "int", "unit": "Percentage", "defaultValue": 0, "minValue": 0, "maxValue": 100 + }, + { + "id": "f8516899-6312-4110-bb97-70ffa81dc530", + "name": "batteryCritical", + "displayName": "battery critical", + "displayNameEvent": "battery critical changed", + "type": "bool", + "defaultValue": false } ], "eventTypes": [