Skip to content

Commit b2c4172

Browse files
Fix user named devices
1 parent c611dcf commit b2c4172

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

custom_components/battery_notes/config_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async def async_step_user(
4949
if CONF_NAME in user_input:
5050
title = user_input.get(CONF_NAME)
5151
else:
52-
title = device_entry.name
52+
title = device_entry.name_by_user or device_entry.name
5353

5454
return self.async_create_entry(
5555
title=title,
@@ -131,7 +131,7 @@ async def save_options(
131131
if CONF_NAME in user_input:
132132
title = user_input.get(CONF_NAME)
133133
else:
134-
title = device_entry.name
134+
title = device_entry.name_by_user or device_entry.name
135135

136136
self._process_user_input(user_input, schema)
137137
self.hass.config_entries.async_update_entry(

custom_components/battery_notes/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"integration_type": "device",
1010
"iot_class": "calculated",
1111
"issue_tracker": "https://github.com/andrew-codechimp/ha-battery-notes/issues",
12-
"version": "0.1.0"
12+
"version": "0.1.1"
1313
}

0 commit comments

Comments
 (0)