mirror of
https://github.com/home-assistant/core.git
synced 2025-08-15 02:21:40 +02:00
Fix options in config flow
This commit is contained in:
@@ -17,11 +17,7 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"cannot_connect": "Failed to connect, please try again",
|
"cannot_connect": "Failed to connect, please try again",
|
||||||
"invalid_auth": "Invalid authentication",
|
"invalid_auth": "Invalid authentication"
|
||||||
"unknown": "Unexpected error"
|
|
||||||
},
|
|
||||||
"abort": {
|
|
||||||
"already_configured": "Device is already configured"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
@@ -32,13 +28,6 @@
|
|||||||
"continuous": "Continuous",
|
"continuous": "Continuous",
|
||||||
"delay": "Delay"
|
"delay": "Delay"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"data": {
|
|
||||||
"certificate": "Certificate",
|
|
||||||
"continuous": "Continuous",
|
|
||||||
"delay": "Delay"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -17,11 +17,7 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"cannot_connect": "Failed to connect, please try again",
|
"cannot_connect": "Failed to connect, please try again",
|
||||||
"invalid_auth": "Invalid authentication",
|
"invalid_auth": "Invalid authentication"
|
||||||
"unknown": "Unexpected error"
|
|
||||||
},
|
|
||||||
"abort": {
|
|
||||||
"already_configured": "Device is already configured"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
@@ -32,13 +28,6 @@
|
|||||||
"continuous": "Continue",
|
"continuous": "Continue",
|
||||||
"delay": "Delais"
|
"delay": "Delais"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"data": {
|
|
||||||
"certificate": "Certificate",
|
|
||||||
"continuous": "Continuous",
|
|
||||||
"delay": "Delay"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -120,16 +120,12 @@ class OptionsFlowHandler(config_entries.OptionsFlow):
|
|||||||
self.config_entry = config_entry
|
self.config_entry = config_entry
|
||||||
|
|
||||||
async def async_step_init(self, user_input=None):
|
async def async_step_init(self, user_input=None):
|
||||||
"""Manage the options."""
|
|
||||||
return await self.async_step_options()
|
|
||||||
|
|
||||||
async def async_step_options(self, user_input=None):
|
|
||||||
"""Manage the options."""
|
"""Manage the options."""
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
return self.async_create_entry(title="", data=user_input)
|
return self.async_create_entry(title="", data=user_input)
|
||||||
|
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="options",
|
step_id="init",
|
||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
{
|
{
|
||||||
vol.Optional(
|
vol.Optional(
|
||||||
|
@@ -17,11 +17,7 @@
|
|||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"cannot_connect": "Failed to connect, please try again",
|
"cannot_connect": "Failed to connect, please try again",
|
||||||
"invalid_auth": "Invalid authentication",
|
"invalid_auth": "Invalid authentication"
|
||||||
"unknown": "Unexpected error"
|
|
||||||
},
|
|
||||||
"abort": {
|
|
||||||
"already_configured": "Device is already configured"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
@@ -32,13 +28,6 @@
|
|||||||
"continuous": "Continuous",
|
"continuous": "Continuous",
|
||||||
"delay": "Delay"
|
"delay": "Delay"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"options": {
|
|
||||||
"data": {
|
|
||||||
"certificate": "Certificate",
|
|
||||||
"continuous": "Continuous",
|
|
||||||
"delay": "Delay"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user