Skip to content

Commit b06a35e

Browse files
author
lexorius
committed
renamed sensors to stein_app_*
1 parent 8f97126 commit b06a35e

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

README.md

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

1010
Displays vehicle and asset status from **Stein.APP** directly in Home Assistant.
1111

12-
**Version 0.3.1b** – 2025-07-04
12+
**Version 0.3.3b** – 2025-07-04
1313

1414
---
1515

custom_components/thw_stein/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"domain": "thw_stein",
33
"name": "THW Stein",
4-
"version": "0.3.1b",
4+
"version": "0.3.3b",
55
"documentation": "https://github.com/Lexorius/HomeAssistant-THW-Stein.app-API",
66
"issue_tracker": "https://github.com/Lexorius/HomeAssistant-THW-Stein.app-API/issues",
77
"requirements": [

custom_components/thw_stein/sensor.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ def _compose_name(asset) -> str:
5353
return " ".join(filter(None, parts))
5454

5555
def _update_from_asset(self, asset):
56-
self._attr_unique_id = f"stein_{self._asset_id}"
57-
self._attr_name = self._compose_name(asset)
56+
slug = self._compose_name(asset).lower().replace(" ", "_").replace("/", "_")
57+
self._attr_unique_id = f"stein_app_{self._asset_id}"
58+
self._attr_name = f"stein_app_{slug}"
59+
#self._attr_unique_id = f"stein_{self._asset_id}"
60+
#self._attr_name = self._compose_name(asset)
5861
raw_status = asset.get("status")
5962
raw_einsatzvorbehalt = asset.get("operationReservation")
6063
self._attr_native_value = STATUS_MAP.get(raw_status)

0 commit comments

Comments
 (0)