Don't allow multiple instances
This commit is contained in:
parent
b241bf10b0
commit
bdd6ab840c
@ -13,6 +13,8 @@ class PlejdConfigFlow(ConfigFlow, domain="plejd"):
|
|||||||
async def async_step_user(self, info=None):
|
async def async_step_user(self, info=None):
|
||||||
|
|
||||||
if info is None:
|
if info is None:
|
||||||
|
if self._async_current_entries():
|
||||||
|
return self.async_abort(reason="single_instance_allowed")
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
step_id="user",
|
step_id="user",
|
||||||
data_schema=vol.Schema(
|
data_schema=vol.Schema(
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"title": "Plejd",
|
"title": "Plejd",
|
||||||
"config": {
|
"config": {
|
||||||
|
"abort": {
|
||||||
|
"single_instance_allowed": "Only one Plejd instance at a time is currently supported."
|
||||||
|
},
|
||||||
"step": {
|
"step": {
|
||||||
"user": {
|
"user": {
|
||||||
"title": "Log in to Plejd",
|
"title": "Log in to Plejd",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user