Skip to content

Commit

Permalink
tweak friendly names
Browse files Browse the repository at this point in the history
  • Loading branch information
jblance authored Jan 15, 2025
1 parent c7d4970 commit 5865494
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions powermon/outputformats/hass.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,11 @@ def format(self, command: Command, result: Result, device_info) -> list:
# Object ID
if self.entity_id_prefix is None:
object_id = f"{data_name}".lower().replace(" ", "_")
name = f"{data_name}"

else:
object_id = f"{self.entity_id_prefix}_{data_name}".lower().replace(" ", "_")
name = f"{self.entity_id_prefix} {data_name}"
#name = f"{self.entity_id_prefix} {data_name}"
name = f"{response.data_name}"

# Home Assistant MQTT Auto Discovery Message
#
Expand Down
4 changes: 2 additions & 2 deletions powermon/protocols/neey.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,14 @@
"construct": settings_construct,
"construct_min_response": 100,
"reading_definitions": [
{"index": "cell_count", "description": "cell_count", "reading_type": ReadingType.NUMBER, "response_type": ResponseType.HEX_CHAR},
{"index": "cell_count", "description": "Cell Count", "reading_type": ReadingType.NUMBER, "response_type": ResponseType.HEX_CHAR},
{"index": "balance_trigger_voltage", "description": "balance_trigger_voltage", "reading_type": ReadingType.VOLTS, "response_type": ResponseType.FLOAT},
{"index": "balance_stop_voltage", "description": "balance_stop_voltage", "reading_type": ReadingType.VOLTS, "response_type": ResponseType.FLOAT},
{"index": "balance_start_voltage", "description": "balance_start_voltage", "reading_type": ReadingType.VOLTS, "response_type": ResponseType.FLOAT},
{"index": "max_balance_current", "description": "max_balance_current", "reading_type": ReadingType.CURRENT, "response_type": ResponseType.FLOAT},
{"index": "nominal_battery_capacity", "description": "nominal_battery_capacity", "reading_type": ReadingType.ENERGY},
{"index": "balancing", "description": "balancing_enabled", "reading_type": ReadingType.ENABLED},
{"index": "buzzer_mode", "description": "buzzer_mode", "reading_type": ReadingType.MESSAGE, "response_type": ResponseType.STRING},
{"index": "buzzer_mode", "description": "Buzzer Mode", "reading_type": ReadingType.MESSAGE, "response_type": ResponseType.STRING},
{"index": "battery_type", "description": "battery_type", "reading_type": ReadingType.MESSAGE, "response_type": ResponseType.STRING},
],
"test_responses": [
Expand Down

0 comments on commit 5865494

Please sign in to comment.