Skip to content

Commit 4c4ee63

Browse files
feat: replace text input with IconSelector dropdown for room icon configuration
- Use IconSelector instead of plain text input for better UX - Users can now browse and select from available Home Assistant icons - Maintains mdi:texture-box as default when no icon is selected - Uses getattr to work around linter limitations with IconSelector
1 parent 89bb6f3 commit 4c4ee63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

custom_components/rooms/config_flow.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ async def async_step_user(self, user_input: Optional[Dict[str, Any]] = None) ->
5757
data_schema=vol.Schema(
5858
{
5959
vol.Required(CONF_ROOM_NAME): str,
60-
vol.Optional(CONF_ICON, default=DEFAULT_ICON): str,
60+
vol.Optional(CONF_ICON, default=DEFAULT_ICON): getattr(selector, "IconSelector")(
61+
getattr(selector, "IconSelectorConfig")()
62+
),
6163
vol.Optional(CONF_POWER_ENTITY): selector.EntitySelector(
6264
selector.EntitySelectorConfig(domain="sensor")
6365
),

0 commit comments

Comments
 (0)