Implement supported locales for Alexa capabilities (#30285)
* Implement Alexa capability supported locales. * Check config for supported locales. * Removed unused import. * Applied some potpourri to improve code smell. * Change supported_locales to set.
This commit is contained in:
1 parent
80701c8f2a
commit
6387a50697
8 files changed
+279
-2
No files matched your search
@@ -8,6 +8,7 @@ from tests.common import async_mock_service
|
||||
|
||||
TEST_URL = "https://api.amazonalexa.com/v3/events"
|
||||
TEST_TOKEN_URL = "https://api.amazon.com/auth/o2/token"
|
||||
TEST_LOCALE = "en-US"
|
||||
|
||||
|
||||
class MockConfig(config.AbstractConfig):
|
||||
@@ -30,6 +31,11 @@ class MockConfig(config.AbstractConfig):
|
||||
"""Endpoint for report state."""
|
||||
return TEST_URL
|
||||
|
||||
@property
|
||||
def locale(self):
|
||||
"""Return config locale."""
|
||||
return TEST_LOCALE
|
||||
|
||||
def should_expose(self, entity_id):
|
||||
"""If an entity should be exposed."""
|
||||
return True
|
||||
|
||||
Reference in new issue
Block a user