Skip to content

Commit f6bca58

Browse files
authored
Merge pull request #2 from CoMPaTech/stability
Stability fixes and missing items
2 parents c52fffc + be7986b commit f6bca58

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

custom_components/stromer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
SCAN_INTERVAL = timedelta(minutes=10)
1515

16-
PLATFORMS: list[Platform] = [Platform.SENSOR, Platform.BINARY_SENSOR]
16+
PLATFORMS: list[Platform] = [Platform.SENSOR, Platform.BINARY_SENSOR, Platform.DEVICE_TRACKER]
1717

1818

1919
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:

custom_components/stromer/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "stromer",
33
"name": "Stromer e-bike",
4-
"version": "0.0.4",
4+
"version": "0.0.5",
55
"documentation": "https://github.com/CoMPaTech/stromer",
66
"requirements": [],
77
"codeowners": ["@CoMPaTech"],

custom_components/stromer/sensor.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@
5050
state_class=SensorStateClass.MEASUREMENT,
5151
),
5252
SensorEntityDescription(
53-
key="batter_SOC",
53+
key="battery_SOC",
5454
name="Battery",
5555
native_unit_of_measurement=PERCENTAGE,
5656
device_class=SensorDeviceClass.BATTERY,
5757
state_class=SensorStateClass.MEASUREMENT,
5858
),
5959
SensorEntityDescription(
60-
key="batter_health",
60+
key="battery_health",
6161
name="Battery Condition",
6262
native_unit_of_measurement=PERCENTAGE,
6363
device_class=None,
@@ -72,7 +72,7 @@
7272
),
7373
SensorEntityDescription(
7474
key="bike_speed",
75-
name="Speed",
75+
name="Bike Speed",
7676
native_unit_of_measurement=SPEED_KILOMETERS_PER_HOUR,
7777
device_class=None,
7878
state_class=SensorStateClass.MEASUREMENT,
@@ -91,6 +91,13 @@
9191
device_class=None,
9292
state_class=SensorStateClass.TOTAL_INCREASING,
9393
),
94+
SensorEntityDescription(
95+
key="speed",
96+
name="Speed",
97+
native_unit_of_measurement=SPEED_KILOMETERS_PER_HOUR,
98+
device_class=None,
99+
state_class=SensorStateClass.MEASUREMENT,
100+
),
94101
SensorEntityDescription(
95102
key="total_distance",
96103
name="Total distance",

custom_components/stromer/stromer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class Stromer:
1616
"""Set up Stromer."""
1717

18-
def __init__(self, username, password, client_id, client_secret, timeout=30):
18+
def __init__(self, username, password, client_id, client_secret, timeout=60):
1919
self.bike = {}
2020
self.status = {}
2121
self.position = {}

0 commit comments

Comments
 (0)