Skip to content

Add workaround for CGPR1 #3

@Jc2k

Description

@Jc2k

Describe the bug

The CGPR1 has an odd battery sensor. @Ernst79 made a workaround in BLE monitor by storing the last 5 readings in a list, and only process the battery reading if it is in the list (only for the CGPR1, the others work fine without the workaround)

https://github.com/custom-components/ble_monitor/blob/de09d4396f2d9ce8f4d44c10c6ef90ebf6483c90/custom_components/ble_monitor/sensor.py#L259

The counter is actually counting downwards, this is what you get without the workaround.

To Reproduce

Additional context

See https://github.com/custom-components/ble_monitor/blob/de09d4396f2d9ce8f4d44c10c6ef90ebf6483c90/custom_components/ble_monitor/sensor.py#L259.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions