Setup basic information


As part of the default onboarding process, Home Assistant can detect your location from IP address geolocation. Home Assistant will automatically select a unit system and time zone based on this location. You may adjust this during onboarding, or afterwards at Settings > System > General, network related configuration is found under Settings > System > Network.

If you prefer YAML, you can add the following information to your configuration.yaml:

homeassistant:
  name: Home
  latitude: 32.87336
  longitude: 117.22743
  elevation: 430
  unit_system: metric
  currency: USD
  country: US
  time_zone: "America/Los_Angeles"
  external_url: "https://www.example.com"
  internal_url: "http://homeassistant.local:8123"
  allowlist_external_dirs:
    - "/usr/var/dumping-ground"
    - "/tmp"
  allowlist_external_urls:
    - "http://images.com/image1.png"
  media_dirs:
    media: "/media"
    recordings: "/mnt/recordings"
  legacy_templates: false

You will not be able to edit anything in Settings > System > General in the UI if you are using YAML configuration for any of the following: name, latitude, longitude, elevation, unit_system, temperature_unit, time_zone, external_url, internal_url, country, currency. Additionally, some options are only visible after “Advanced Mode” is enabled on your User Profile.

Configuration Variables

name string (Optional)

Name of the location where Home Assistant is running.

latitude float (Optional)

Latitude of your location required to calculate the time the sun rises and sets.

longitude float (Optional)

Longitude of your location required to calculate the time the sun rises and sets.

elevation integer (Optional)

Altitude above sea level in meters. Impacts sunrise data.

unit_system string (Optional)

metric for Metric, us_customary for US Customary. This also sets temperature_unit, Celsius for Metric and Fahrenheit for US Customary

temperature_unit string (Optional)

Override temperature unit set by unit_system. C for Celsius, F for Fahrenheit.

time_zone string (Optional)

Pick your time zone from the column TZ of Wikipedia’s list of tz database time zones

currency string (Optional, default: EUR)

Pick your currency code from the column Code of Wikipedia’s list of ISO 4217 active codes

external_url string (Optional)

The URL that Home Assistant is available on from the internet. For example: https://example.duckdns.org:8123. Note that this setting may only contain a protocol, hostname and port; using a path is not supported.

internal_url string (Optional)

The URL that Home Assistant is available on from your local network. For example: http://homeassistant.local:8123. Note that this setting may only contain a protocol, hostname and port; using a path is not supported.

customize string (Optional)

Customize entities.

customize_domain string (Optional)

Customize all entities in a domain.

customize_glob string (Optional)

Customize entities matching a pattern.

allowlist_external_dirs list (Optional)

List of folders that can be used as sources for sending files.

allowlist_external_urls list (Optional)

List of external URLs that can be fetched. URLs can match specific resources (e.g., http://10.10.10.12/images/image1.jpg) or a relative path that allows access to resources within it (e.g., http://10.10.10.12/images would allow access to anything under that path)

media_dirs map (Optional)

A mapping of local media sources and their paths on disk.

legacy_templates boolean (Optional, default: false)

Enable this option to restore pre-0.117 template rendering. Which renders all templates to string, instead of native types.

language string (Optional, default: en)

Default language used by Home Assistant. This may, for example, influence the language used by voice assistants. The language should be specified as an RFC 5646 language tag, and must be a language which Home Assistant is translated to.

country string (Optional)

Country in which Home Assistant is running. This may, for example, influence radio settings to comply with local regulations. The country should be specified as an ISO 3166.1 alpha-2 code. Pick your country from the column Code of Wikipedia’s list of ISO 31661 alpha-2 officially assigned code codes

Reload Core Service

Home Assistant offers a service to reload the core configuration while Home Assistant is running called homeassistant.reload_core_config. This allows you to change any of the above sections and see it being applied without having to restart Home Assistant. To call this service, go to the “Services” tab under Developer Tools, select the homeassistant.reload_core_config service and click the “CALL SERVICE” button. Alternatively, you can press the “Reload Location & Customizations” button under Developer Tools > YAML.