CestLaGalere / mobilealerts

Retrieves sensor data for Mobile Alerts sensors for Home Assistant
Apache License 2.0
15 stars 6 forks source link

Binary sensor for low battery #19

Open MichaelS1955 opened 7 months ago

MichaelS1955 commented 7 months ago

Hi,

It would be nice to see the battery status of a device. There is a property to get the status

"lowbat: If a sensor was low on battery when sending the measurement. "

petrleocompel commented 7 months ago

This is the data which is send by one of your devices

curl -d "{'deviceids': '0358957DD926'}" -H "Content-Type: application/json" https://www.data199.com/api/pv1/device/lastmeasurement

{
  "devices": [
    {
      "deviceid": "0358957DD926",
      "lastseen": 1706275297,
      "lowbattery": false,
      "measurement": {
        "idx": 228537,
        "ts": 1706275291,
        "c": 1706275297,
        "lb": false,
        "t1": 7.6,
        "h": 82.0
      }
    }
  ],
  "success": true
}

Is anything looking like battery status ? I do not think it is being provided to the cloud.

petrleocompel commented 7 months ago

We can only say battery is low by lowbattery

petrleocompel commented 7 months ago

Checked - we could utilize - binary sensor battery. On = low battery, off = normal

MichaelS1955 commented 7 months ago

Thank you. That helps

Von: Petr Leo Compel @.> Gesendet: Samstag, 27. Januar 2024 19:51 An: CestLaGalere/mobilealerts @.> Cc: MichaelS1955 @.>; Author @.> Betreff: Re: [CestLaGalere/mobilealerts] Battery status (Issue #19)

Checked - we could utilize - binary sensor battery. On = low battery, off = normal

— Reply to this email directly, view it on GitHub https://github.com/CestLaGalere/mobilealerts/issues/19#issuecomment-1913291017 , or unsubscribe https://github.com/notifications/unsubscribe-auth/A4FFNJQ7QEMXEXSRIIPGFG3YQVEBJAVCNFSM6AAAAABCNIGKMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGI4TCMBRG4 . You are receiving this because you authored the thread. https://github.com/notifications/beacon/A4FFNJUWRG5T4YICQLP5YFTYQVEBJA5CNFSM6AAAAABCNIGKMWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTSBKAQS.gif Message ID: @. @.> >