From ed607db9d73b4ae7f4bd7a5ce8fc3b946133d718 Mon Sep 17 00:00:00 2001 From: ewilly Date: Fri, 16 Dec 2022 14:43:40 +0100 Subject: [PATCH] Setup basic information --- check_process | 8 +++ .../configuration.yaml | 9 ++- manifest.json | 65 +++++++++++++++++++ scripts/install | 8 +++ 4 files changed, 89 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index 5b2abdd..4ca3bbf 100644 --- a/check_process +++ b/check_process @@ -2,6 +2,14 @@ ; Manifest domain="domain.tld" is_public=1 + home="Home" + latitude="32.87336" + longitude="117.22743" + elevation="430" + unit_system="metric" + currency="USD" + country="US" + time_zone="America/Los_Angeles" ; Checks pkg_linter=1 setup_sub_dir=0 diff --git a/conf/homeassistant_conf_files/configuration.yaml b/conf/homeassistant_conf_files/configuration.yaml index 9e296f1..977927f 100644 --- a/conf/homeassistant_conf_files/configuration.yaml +++ b/conf/homeassistant_conf_files/configuration.yaml @@ -1,5 +1,12 @@ homeassistant: - country: FR + name: __HOME__ + latitude: __LATITUDE__ + longitude: __LONGITUDE__ + elevation: __ELEVATION__ + unit_system: __UNIT_SYSTEM__ + currency: __CURRENCY__ + country: __COUNTRY__ + time_zone: __TIME_ZONE__ external_url: "https://__DOMAIN__" auth_providers: - type: command_line diff --git a/manifest.json b/manifest.json index fdab892..17a440e 100644 --- a/manifest.json +++ b/manifest.json @@ -41,6 +41,71 @@ "fr": "Dans le cas contraire, l'application sur Smartphone ne fonctionnera pas" }, "default": true + }, + { + "name": "home", + "type": "string", + "ask": { + "en": "Name of the location where Home Assistant is running." + }, + "default": "Home" + }, + { + "name": "latitude", + "type": "string", + "ask": { + "en": "Latitude of your location required to calculate the time the sun rises and sets--> https://www.openstreetmap.org" + }, + "default": 32.87336 + }, + { + "name": "longitude", + "type": "string", + "ask": { + "en": "Longitude of your location required to calculate the time the sun rises and sets --> https://www.openstreetmap.org" + }, + "default": 117.22743 + }, + { + "name": "elevation", + "type": "number", + "ask": { + "en": "Altitude above sea level in meters. Impacts sunrise data." + }, + "default": 430 + }, + { + "name": "unit_system", + "type": "string", + "ask": { + "en": "metric for Metric, us_customary for US Customary. This also sets temperature_unit, Celsius for Metric and Fahrenheit for US Customary." + }, + "choices": ["metric", "us_customary"], + "default": "metric" + }, + { + "name": "currency", + "type": "string", + "ask": { + "en": "Pick your currency code from the column Code of Wikipedia’s list of ISO 4217 active codes --> https://en.wikipedia.org/wiki/ISO_4217#Active_codes" + }, + "default": "USD" + }, + { + "name": "country", + "type": "string", + "ask": { + "en": "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 --> https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements" + }, + "default": "US" + }, + { + "name": "time_zone", + "type": "string", + "ask": { + "en": "Pick your time zone from the column TZ of Wikipedia’s list of tz database time zones --> https://en.wikipedia.org/wiki/List_of_tz_database_time_zones" + }, + "default": "America/Los_Angeles" } ] } diff --git a/scripts/install b/scripts/install index 2b89904..b6d03b6 100644 --- a/scripts/install +++ b/scripts/install @@ -26,6 +26,14 @@ app=$YNH_APP_INSTANCE_NAME domain=$YNH_APP_ARG_DOMAIN is_public=$YNH_APP_ARG_IS_PUBLIC +home=$YNH_APP_ARG_HOME +latitude=$YNH_APP_ARG_LATITUDE +longitude=$YNH_APP_ARG_LONGITUDE +elevation=$YNH_APP_ARG_ELEVATION +unit_system=$YNH_APP_ARG_UNIT_SYSTEM +currency=$YNH_APP_ARG_CURRENCY +country=$YNH_APP_ARG_COUNTRY +time_zone=$YNH_APP_ARG_TIME_ZONE #================================================= # DEFINE USEFULL VARS