|
| None | __init__ (self, HomeAssistant hass, str config_dir) |
| |
| dict[str, Any] | as_dict (self) |
| |
| None | async_initialize (self) |
| |
| None | async_load (self) |
| |
| None | async_set_time_zone (self, str time_zone_str) |
| |
| None | async_update (self, **Any kwargs) |
| |
| float|None | distance (self, float lat, float lon) |
| |
| bool | is_allowed_external_url (self, str url) |
| |
| bool | is_allowed_path (self, str path) |
| |
| str | path (self, *str path) |
| |
| None | set_time_zone (self, str time_zone_str) |
| |
|
| None | _async_store (self) |
| |
| None | _async_update (self, *str|UndefinedType|None country=UNDEFINED, str|None currency=None, int|None elevation=None, str|UndefinedType|None external_url=UNDEFINED, str|UndefinedType|None internal_url=UNDEFINED, str|None language=None, float|None latitude=None, str|None location_name=None, float|None longitude=None, int|None radius=None, ConfigSource source, str|None time_zone=None, str|None unit_system=None) |
| |
Configuration settings for Home Assistant.
Definition at line 508 of file core_config.py.
◆ __init__()
| None homeassistant.core_config.Config.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass, |
|
|
str |
config_dir |
|
) |
| |
◆ _async_store()
| None homeassistant.core_config.Config._async_store |
( |
|
self | ) |
|
|
private |
◆ _async_update()
| None homeassistant.core_config.Config._async_update |
( |
|
self, |
|
|
*str | UndefinedType | None |
country = UNDEFINED, |
|
|
str | None |
currency = None, |
|
|
int | None |
elevation = None, |
|
|
str | UndefinedType | None |
external_url = UNDEFINED, |
|
|
str | UndefinedType | None |
internal_url = UNDEFINED, |
|
|
str | None |
language = None, |
|
|
float | None |
latitude = None, |
|
|
str | None |
location_name = None, |
|
|
float | None |
longitude = None, |
|
|
int | None |
radius = None, |
|
|
ConfigSource |
source, |
|
|
str | None |
time_zone = None, |
|
|
str | None |
unit_system = None |
|
) |
| |
|
private |
Update the configuration from a dictionary.
Definition at line 710 of file core_config.py.
◆ as_dict()
| dict[str, Any] homeassistant.core_config.Config.as_dict |
( |
|
self | ) |
|
Return a dictionary representation of the configuration.
Async friendly.
Definition at line 649 of file core_config.py.
◆ async_initialize()
| None homeassistant.core_config.Config.async_initialize |
( |
|
self | ) |
|
Finish initializing a config object.
This must be called before the config object is used.
Definition at line 587 of file core_config.py.
◆ async_load()
| None homeassistant.core_config.Config.async_load |
( |
|
self | ) |
|
◆ async_set_time_zone()
| None homeassistant.core_config.Config.async_set_time_zone |
( |
|
self, |
|
|
str |
time_zone_str |
|
) |
| |
◆ async_update()
| None homeassistant.core_config.Config.async_update |
( |
|
self, |
|
|
**Any |
kwargs |
|
) |
| |
Update the configuration from a dictionary.
Definition at line 757 of file core_config.py.
◆ distance()
| float | None homeassistant.core_config.Config.distance |
( |
|
self, |
|
|
float |
lat, |
|
|
float |
lon |
|
) |
| |
Calculate distance from Home Assistant.
Async friendly.
Definition at line 594 of file core_config.py.
◆ is_allowed_external_url()
| bool homeassistant.core_config.Config.is_allowed_external_url |
( |
|
self, |
|
|
str |
url |
|
) |
| |
◆ is_allowed_path()
| bool homeassistant.core_config.Config.is_allowed_path |
( |
|
self, |
|
|
str |
path |
|
) |
| |
Check if the path is valid for access from outside.
This function does blocking I/O and should not be called from the event loop.
Use hass.async_add_executor_job to schedule it on the executor.
Definition at line 621 of file core_config.py.
◆ path()
| str homeassistant.core_config.Config.path |
( |
|
self, |
|
|
*str |
path |
|
) |
| |
Generate path to the file within the configuration directory.
Async friendly.
Definition at line 604 of file core_config.py.
◆ set_time_zone()
| None homeassistant.core_config.Config.set_time_zone |
( |
|
self, |
|
|
str |
time_zone_str |
|
) |
| |
Set the time zone.
This is a legacy method that should not be used in new code.
Use async_set_time_zone instead.
It will be removed in Home Assistant 2025.6.
Definition at line 690 of file core_config.py.
◆ _store
| homeassistant.core_config.Config._store |
|
private |
◆ config_source
| homeassistant.core_config.Config.config_source |
◆ country
| homeassistant.core_config.Config.country |
◆ currency
| homeassistant.core_config.Config.currency |
◆ elevation
| homeassistant.core_config.Config.elevation |
◆ external_url
| homeassistant.core_config.Config.external_url |
◆ hass
| homeassistant.core_config.Config.hass |
◆ internal_url
| homeassistant.core_config.Config.internal_url |
◆ language
| homeassistant.core_config.Config.language |
◆ latitude
| homeassistant.core_config.Config.latitude |
◆ location_name
| homeassistant.core_config.Config.location_name |
◆ longitude
| homeassistant.core_config.Config.longitude |
◆ radius
| homeassistant.core_config.Config.radius |
◆ time_zone
| homeassistant.core_config.Config.time_zone |
◆ units
| homeassistant.core_config.Config.units |
◆ webrtc
| homeassistant.core_config.Config.webrtc |
The documentation for this class was generated from the following file: