Skip to content

Commit

Permalink
Merge pull request #88 from msp1974/dev
Browse files Browse the repository at this point in the history
Replace deprecated device class constant
  • Loading branch information
ismarslomic authored Jan 9, 2023
2 parents ac068f3 + 9326eca commit 294e66a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![GitHub license](https://img.shields.io/github/license/msp1974/homeassistant-jlrincontrol)](https://github.com/msp1974/homeassistant-jlrincontrol/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/msp1974/homeassistant-jlrincontrol)](https://GitHub.com/msp1974/homeassistant-jlrincontrol/releases/)

# JLR Home Assistant Integration (v2.2.2)
# JLR Home Assistant Integration (v2.2.3)

This repository contains a Home Assistant integration for the Jaguar Landrover InControl system, allowing visibility of key vehicle information and control of enabled services.

Expand Down Expand Up @@ -134,6 +134,9 @@ This integration uses the jlrpy api written by [ardevd](https://github.com/ardev
# Change Log
## v2.2.3
- Fix usage of deprecated device class constant [#84](https://github.com/msp1974/homeassistant-jlrincontrol/issues/84)
## v2.2.2
- Fix deprecation issue of async_get_registry [#74](https://github.com/msp1974/homeassistant-jlrincontrol/issues/74)
- Fix distance and pressure deprecated to use unit_conversion
Expand Down
2 changes: 1 addition & 1 deletion custom_components/jlrincontrol/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
DOMAIN = "jlrincontrol"
DATA_JLR_CONFIG = "jlrincontrol_config"
JLR_DATA = "jlr_data"
VERSION = "2.2.2"
VERSION = "2.2.3"

CONF_USE_CHINA_SERVERS = "use_china_servers"

Expand Down
2 changes: 1 addition & 1 deletion custom_components/jlrincontrol/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"dependencies": [],
"codeowners": ["@msp1974"],
"requirements": ["jlrpy==1.4.1"],
"version": "2.2.2"
"version": "2.2.3"
}
4 changes: 2 additions & 2 deletions custom_components/jlrincontrol/sensor.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Support for JLR InControl Sensors."""
import logging

from homeassistant.components.sensor import SensorDeviceClass
# from homeassistant.const import STATE_OFF, UNIT_PERCENTAGE
from homeassistant.const import (
DEVICE_CLASS_BATTERY,
PERCENTAGE,
LENGTH_KILOMETERS,
LENGTH_METERS,
Expand Down Expand Up @@ -398,7 +398,7 @@ def state(self):
@property
def device_class(self):
"""Return the class of the sensor."""
return DEVICE_CLASS_BATTERY
return SensorDeviceClass.BATTERY

@property
def unit_of_measurement(self):
Expand Down

0 comments on commit 294e66a

Please sign in to comment.