home-assistant/core

Rflink sensor_type battery is missing device_class

fsaris opened this issue · 4 comments

fsaris commented

The problem

Sensors defined as battery don't get the device_type battery

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

rflink

Link to integration documentation on our website

No response

Diagnostics information

Sensors defined as battery don't get the device_type battery

homeassistant/components/rflink/sensor.py

SensorEntityDescription(
        key="battery",
        name="Battery",
        icon="mdi:battery",
    ),

Could be updated to the following to resolve this:

SensorEntityDescription(
        key="battery",
        name="Battery",
        device_class=SensorDeviceClass.BATTERY,
    ),

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Hey there @javicalle, mind taking a look at this issue as it has been labeled with an integration (rflink) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of rflink can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign rflink Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


rflink documentation
rflink source
(message by IssueLinks)

Hi @fsaris
Home Assistant is an open source projects, those lives from contributions of the community. Therefore any contribution would be highly appreciated ❤️ so if you're are comfortable with this, feel free to create a pull request to adjust this.