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."""
|
"""Config helpers for Alexa."""
|
||||||
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
from homeassistant.core import callback
|
from homeassistant.core import callback
|
||||||
|
|
||||||
from .state_report import async_enable_proactive_mode
|
from .state_report import async_enable_proactive_mode
|
||||||
|
|
||||||
|
|
||||||
class AbstractConfig:
|
class AbstractConfig(ABC):
|
||||||
"""Hold the configuration for Alexa."""
|
"""Hold the configuration for Alexa."""
|
||||||
|
|
||||||
_unsub_proactive_report = None
|
_unsub_proactive_report = None
|
||||||
|
@ -29,9 +31,9 @@ class AbstractConfig:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@abstractmethod
|
||||||
def locale(self):
|
def locale(self):
|
||||||
"""Return config locale."""
|
"""Return config locale."""
|
||||||
return None
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def entity_config(self):
|
def entity_config(self):
|
||||||
|
|
|
@ -78,6 +78,12 @@ class AlexaConfig(alexa_config.AbstractConfig):
|
||||||
|
|
||||||
return self._endpoint
|
return self._endpoint
|
||||||
|
|
||||||
|
@property
|
||||||
|
def locale(self):
|
||||||
|
"""Return config locale."""
|
||||||
|
# Not clear how to determine locale atm.
|
||||||
|
return "en-US"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def entity_config(self):
|
def entity_config(self):
|
||||||
"""Return entity config."""
|
"""Return entity config."""
|
||||||
|
|
Loading…
Add table
Reference in a new issue