Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get battery charging state to work. #732

Open
RedNo7 opened this issue Jul 30, 2024 · 0 comments
Open

Can't get battery charging state to work. #732

RedNo7 opened this issue Jul 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@RedNo7
Copy link

RedNo7 commented Jul 30, 2024

Describe the bug
I have a bunch of Aqara shades with the following (type) of entities: sensor.bedroom_shade_battery

How to reproduce
From my yaml below I am trying to list them all and also show the charging status but I cannot get it to work.

Expected behavior
I'm expecting to see a status per the docs, with a 'flas' icon when charging

YAML configuration

  - type: custom:battery-state-card
    title: 'Shades'
    default_state_formatting: false
    sort:
      by: "state"
    collapse:
      - name: 'x{count} at {min}% min'
        min: 70
    colors:
      steps:
        - "#ff0000" # red
        - "#ffff00" # yellow
        - "#00ff00" # green
      gradient: true
    bulk_rename:  # note: "to" is not required if you want to remove string
      - from: " Battery"
      - from: " shade"
    filter:
      include:
        - name: entity_id
          value: "sensor.*_shade*battery"
    #secondary_info: "{charging}"
    charging_state:
      attribute:
        name: "charging_status"
        value: "true"
      icon: "mdi:flash"

Entity debug data

{
  "entity_id": "sensor.bedroom_shade_battery",
  "state": "73",
  "attributes": {
    "state_class": "measurement",
    "battery": 73,
    "charging_status": true,
    "device_temperature": 33,
    "linkquality": 61,
    "motor_speed": "high",
    "motor_state": "stopped",
    "position": 100,
    "power_outage_count": 444,
    "running": false,
    "update": {
      "installed_version": 3870,
      "latest_version": 3870,
      "state": "idle"
    },
    "update_available": null,
    "unit_of_measurement": "%",
    "device_class": "battery",
    "friendly_name": "Bedroom shade Battery"
  },
  "context": {
    "id": "01J41SYKYGBGAQ8WRWN5R6FRBA",
    "parent_id": null,
    "user_id": null
  },
  "last_changed": "2024-07-30T12:30:58.000Z",
  "last_updated": "2024-07-30T12:30:58.000Z",
  "display": {
    "entity_id": "sensor.bedroom_shade_battery",
    "device_id": "74ed47147bdd8948e7b4b47ee32cf9b6",
    "labels": [],
    "platform": "mqtt",
    "entity_category": "diagnostic",
    "name": "Battery"
  },
  "device": {
    "area_id": null,
    "configuration_url": null,
    "config_entries": [
      "9eb50c5fe32b415269c3e42d545b4457"
    ],
    "connections": [],
    "disabled_by": null,
    "entry_type": null,
    "hw_version": null,
    "id": "74ed47147bdd8948e7b4b47ee32cf9b6",
    "identifiers": [
      [
        "mqtt",
        "zigbee2mqtt_0x54ef44100078540c"
      ]
    ],
    "labels": [],
    "manufacturer": "Aqara",
    "model": "Roller shade driver E1 (ZNJLBL01LM)",
    "name_by_user": null,
    "name": "Bedroom shade",
    "primary_config_entry": "9eb50c5fe32b415269c3e42d545b4457",
    "serial_number": null,
    "sw_version": null,
    "via_device_id": "0817c962606c5d5a58693d97498a36c1"
  }
}

Dev console errors
No batter-state-card errors
Screenshots
Screenshot 2024-07-30 at 13 27 00
Screenshot 2024-07-30 at 13 26 50

Version

@RedNo7 RedNo7 added the bug Something isn't working label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant