diff --git a/custom_components/places/config_flow.py b/custom_components/places/config_flow.py index b6ed7eb..f5698e1 100644 --- a/custom_components/places/config_flow.py +++ b/custom_components/places/config_flow.py @@ -232,6 +232,9 @@ async def async_step_user( ) ), vol.Optional(CONF_LANGUAGE): str, + vol.Optional(CONF_USE_GPS, default=DEFAULT_USE_GPS): selector.BooleanSelector( + selector.BooleanSelectorConfig() + ), vol.Optional( CONF_EXTENDED_ATTR, default=DEFAULT_EXTENDED_ATTR ): selector.BooleanSelector(selector.BooleanSelectorConfig()), @@ -248,9 +251,6 @@ async def async_step_user( mode=selector.SelectSelectorMode.DROPDOWN, ) ), - vol.Optional(CONF_USE_GPS, default=DEFAULT_USE_GPS): selector.BooleanSelector( - selector.BooleanSelectorConfig() - ), } ) # If there is no user input or there were errors, show the form again, including any errors that were found with the input. @@ -393,6 +393,10 @@ async def async_step_init( "suggested_value": self.config_entry.data.get(CONF_LANGUAGE, None) }, ): str, + vol.Optional( + CONF_USE_GPS, + default=(self.config_entry.data.get(CONF_USE_GPS, DEFAULT_USE_GPS)), + ): selector.BooleanSelector(selector.BooleanSelectorConfig()), vol.Optional( CONF_EXTENDED_ATTR, default=(self.config_entry.data.get(CONF_EXTENDED_ATTR, DEFAULT_EXTENDED_ATTR)), @@ -417,10 +421,6 @@ async def async_step_init( mode=selector.SelectSelectorMode.DROPDOWN, ) ), - vol.Optional( - CONF_USE_GPS, - default=(self.config_entry.data.get(CONF_USE_GPS, DEFAULT_USE_GPS)), - ): selector.BooleanSelector(selector.BooleanSelectorConfig()), } ) diff --git a/custom_components/places/translations/en.json b/custom_components/places/translations/en.json index 13b8a71..d57de68 100644 --- a/custom_components/places/translations/en.json +++ b/custom_components/places/translations/en.json @@ -13,12 +13,17 @@ "map_zoom": "Map Zoom", "api_key": "Email to use as OpenStreetMap API Key (optional)", "language": "Language (optional)", + "use_gps_accuracy": "Use GPS Accuracy", "extended_attr": "Enable Extended Attributes", "show_time": "Show last updated time at end of state '(since xx:yy)'", - "date_format": "Date format to show at end of state when not changed >24h", - "use_gps_accuracy": "Use GPS Accuracy" + "date_format": "Date format to show at end of state when not changed >24h" }, - "description": "Create a new sensor\nSee [Configuration Options]({component_config_url}) on GitHub for details" + "description": "Create a new sensor\nSee [Configuration Options]({component_config_url}) on GitHub for details", + "data_description": { + "options": "See [Configuration Options]({component_config_url}) on GitHub for details", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } }, @@ -34,12 +39,17 @@ "map_zoom": "Map Zoom", "api_key": "Email to use as OpenStreetMap API Key (optional)", "language": "Language (optional)", + "use_gps_accuracy": "Use GPS Accuracy", "extended_attr": "Enable Extended Attributes", "show_time": "Show last updated time at end of state '(since xx:yy)'", - "date_format": "Date format to show at end of state when not changed >24h", - "use_gps_accuracy": "Use GPS Accuracy" + "date_format": "Date format to show at end of state when not changed >24h" }, - "description": "**Updating sensor: {sensor_name}**\nSee [Configuration Options]({component_config_url}) on GitHub for details" + "description": "**Updating sensor: {sensor_name}**\nSee [Configuration Options]({component_config_url}) on GitHub for details", + "data_description": { + "options": "See [Configuration Options]({component_config_url}) on GitHub for details", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } } diff --git a/custom_components/places/translations/ru.json b/custom_components/places/translations/ru.json index 058b0d3..1577be0 100644 --- a/custom_components/places/translations/ru.json +++ b/custom_components/places/translations/ru.json @@ -17,7 +17,12 @@ "show_time": "Показать время последнего обновления в конце состояния '(начиная с xx:yy)'", "use_gps_accuracy": "Используйте точность GPS" }, - "description": "Создайте новый датчик\nПодробнее см. [Параметры конфигурации]({component_config_url}) на GitHub." + "description": "Создайте новый датчик\nПодробнее см. [Параметры конфигурации]({component_config_url}) на GitHub.", + "data_description": { + "options": "Подробнее см. [Параметры конфигурации]({component_config_url}) на GitHub", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } }, @@ -37,7 +42,12 @@ "show_time": "Показать время последнего обновления в конце состояния '(начиная с xx:yy)'", "use_gps_accuracy": "Используйте точность GPS" }, - "description": "**Обновление сенсора: {sensor_name}**\nПодробности см. в [Параметры конфигурации]({component_config_url}) на GitHub." + "description": "**Обновление сенсора: {sensor_name}**\nПодробности см. в [Параметры конфигурации]({component_config_url}) на GitHub.", + "data_description": { + "options": "Подробнее см. [Параметры конфигурации]({component_config_url}) на GitHub", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } } diff --git a/custom_components/places/translations/sk.json b/custom_components/places/translations/sk.json index f9ffcdd..dbad4f3 100644 --- a/custom_components/places/translations/sk.json +++ b/custom_components/places/translations/sk.json @@ -18,7 +18,12 @@ "date_format": "Formát dátumu, ktorý sa zobrazí na konci stavu, keď sa nezmení >24 hodín", "use_gps_accuracy": "Použite presnosť GPS" }, - "description": "Vytvorte nový senzor\nPodrobnosti nájdete v [Možnosti konfigurácie] ({component_config_url}) na GitHub" + "description": "Vytvorte nový senzor\nPodrobnosti nájdete v [Možnosti konfigurácie] ({component_config_url}) na GitHub", + "data_description": { + "options": "Podrobnosti nájdete v [Možnosti konfigurácie] ({component_config_url}) na GitHub", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } }, @@ -27,7 +32,7 @@ "init": { "title": "Miesta: OpenStreetMap snímač", "data": { - "devicetracker_id": "Tracked Entity ID", + "devicetracker_id": "ID sledovanej entity", "home_zone": "Domáca zóna", "options": "Možnosti zobrazenia", "map_provider": "Poskytovateľ mapy", @@ -39,7 +44,12 @@ "date_format": "Formát dátumu, ktorý sa zobrazí na konci stavu, keď sa nezmení >24 hodín", "use_gps_accuracy": "Použite presnosť GPS" }, - "description": "**Aktualizuje sa senzor: {sensor_name}**\nPodrobnosti nájdete v [Možnosti konfigurácie]({component_config_url}) na GitHub" + "description": "**Aktualizuje sa senzor: {sensor_name}**\nPodrobnosti nájdete v [Možnosti konfigurácie]({component_config_url}) na GitHub", + "data_description": { + "options": "Podrobnosti nájdete v [Možnosti konfigurácie] ({component_config_url}) na GitHub", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } } diff --git a/custom_components/places/translations/uk.json b/custom_components/places/translations/uk.json index dc7e086..64dab7f 100644 --- a/custom_components/places/translations/uk.json +++ b/custom_components/places/translations/uk.json @@ -17,7 +17,12 @@ "show_time": "Показати час останнього оновлення в кінці стану '(з xx:yy)'", "use_gps_accuracy": "Використовуйте точність GPS" }, - "description": "Create a new sensor\nSee [Configuration Options]({component_config_url}) on GitHub for details" + "description": "Create a new sensor\nДетальніше див. [Параметри конфігурації]({component_config_url}) на GitHub", + "data_description": { + "options": "Детальніше див. [Параметри конфігурації]({component_config_url}) на GitHub", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } }, @@ -37,7 +42,12 @@ "show_time": "Показати час останнього оновлення в кінці стану '(з xx:yy)'", "use_gps_accuracy": "Використовуйте точність GPS" }, - "description": "**Оновлення датчика: {sensor_name}**\nДетальніше див. [Параметри конфігурації]({component_config_url}) на GitHub" + "description": "**Оновлення датчика: {sensor_name}**\nДетальніше див. [Параметри конфігурації]({component_config_url}) на GitHub", + "data_description": { + "options": "Детальніше див. [Параметри конфігурації]({component_config_url}) на GitHub", + "extended_attr": "Show extended attributes: wikidata_id, osm_dict, osm_details_dict, wikidata_dict (if they exist). Provides many additional attributes for advanced logic. Warning, this will make the attributes very long!", + "use_gps_accuracy": "Set this to False if your Device Tracker has a GPS Accuracy (gps_accuracy) attribute, but it always shows 0 even if the latitude and longitude are correct." + } } } }