Set default locale for cloud Alexa config (#30749)
This commit is contained in:
parent
f9fe91ee74
commit
1e3b3ecbe6
2 changed files with 10 additions and 2 deletions
|
@ -1,10 +1,12 @@
|
|||
"""Config helpers for Alexa."""
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from homeassistant.core import callback
|
||||
|
||||
from .state_report import async_enable_proactive_mode
|
||||
|
||||
|
||||
class AbstractConfig:
|
||||
class AbstractConfig(ABC):
|
||||
"""Hold the configuration for Alexa."""
|
||||
|
||||
_unsub_proactive_report = None
|
||||
|
@ -29,9 +31,9 @@ class AbstractConfig:
|
|||
return None
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def locale(self):
|
||||
"""Return config locale."""
|
||||
return None
|
||||
|
||||
@property
|
||||
def entity_config(self):
|
||||
|
|
|
@ -78,6 +78,12 @@ class AlexaConfig(alexa_config.AbstractConfig):
|
|||
|
||||
return self._endpoint
|
||||
|
||||
@property
|
||||
def locale(self):
|
||||
"""Return config locale."""
|
||||
# Not clear how to determine locale atm.
|
||||
return "en-US"
|
||||
|
||||
@property
|
||||
def entity_config(self):
|
||||
"""Return entity config."""
|
||||
|
|
Loading…
Add table
Reference in a new issue