Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Netatmo: Fix for defect #4015, added support for BatteryStatus and new BatteryPercentage parameter #4016

Merged
merged 1 commit into from Feb 11, 2016

Conversation

robnielsen
Copy link
Contributor

Fix defect #4015, battery percentages are wrong.

Added support for BatteryStatus, which is similar to WifiStatus and RfStatus.

Added parameter BatteryPercentage which provides the same value as Batteryvp, but is more descriptive of what the parameter actually is used for.

Added support for BatteryStatus, which is similar to WifiStatus and RfStatus.

Added parameter BatteryPercentage which provides the same value as Batteryvp, but is more descriptive of what the parameter actually is used for.
case BATTERYVP:
case RFSTATUS:
for (Device device : stationsDataResponse.getDevices()) {
for (Module module : device.getModules()) {
if (module.getId().equals(moduleId)) {
switch (measureType) {
case BATTERYPERCENT:
case BATTERYVP:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that binding users can't retrieve the battery_vp value because it's returned as a percentage instead of its actual value? Otherwise the pr lgtm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that is correct. This is from the Netatmo documentation:

Number   Netatmo_Outdoor_Batteryvp "Outdoor battery status [%d %%]"  (Netatmo {netatmo="00:00:00:00:00:00#02:00:00:00:00:00#Batteryvp"}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Rob. Well a percentage is probably a little more useful anyway....

@teichsta teichsta added this to the 1.9.0 milestone Feb 11, 2016
teichsta added a commit that referenced this pull request Feb 11, 2016
Netatmo: Fix for defect #4015, added support for BatteryStatus and new BatteryPercentage parameter
@teichsta teichsta merged commit 097d079 into openhab:master Feb 11, 2016
@teichsta
Copy link
Member

Thanks guys!

@lolodomo
Copy link
Contributor

Please include this patch in 1.8.2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants