From 4831d7ed0a941fd25f926ab5142f575533486d4e Mon Sep 17 00:00:00 2001 From: Paul Sinclair Date: Sun, 1 Mar 2020 13:19:04 -0500 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=94=A8Add=20mealplan=20first=20day=20?= =?UTF-8?q?of=20week?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grocy/config.json | 1 + grocy/rootfs/etc/services.d/php-fpm/run | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/grocy/config.json b/grocy/config.json index f854b1b..dcfefee 100755 --- a/grocy/config.json +++ b/grocy/config.json @@ -64,6 +64,7 @@ }, "tweaks": { "chores_assignment": "bool", + "meal_plan_first_day_of_week": "int(0,6)?", "multiple_shopping_lists": "bool", "stock_best_before_date_tracking": "bool", "stock_location_tracking": "bool", diff --git a/grocy/rootfs/etc/services.d/php-fpm/run b/grocy/rootfs/etc/services.d/php-fpm/run index c628ac5..e68f866 100644 --- a/grocy/rootfs/etc/services.d/php-fpm/run +++ b/grocy/rootfs/etc/services.d/php-fpm/run @@ -45,6 +45,11 @@ if bashio::config.false 'tweaks.chores_assignment'; then export GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS=0 fi +if bashio::config.has_value 'tweaks.meal_plan_first_day_of_week'; then + GROCY_MEALDAY=$(bashio::config 'tweaks.meal_plan_first_day_of_week') + export GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK=${GROCY_MEALDAY} +fi + if bashio::config.false 'tweaks.multiple_shopping_lists'; then export GROCY_FEATURE_FLAG_SHOPPINGLIST_MULTIPLE_LISTS=0 fi From d53b69314357f16366888d8ae3525d6f2ce675e7 Mon Sep 17 00:00:00 2001 From: Paul Sinclair Date: Sun, 1 Mar 2020 14:21:13 -0500 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=94=A8Rename=20variable=20to=20mealda?= =?UTF-8?q?y?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grocy/rootfs/etc/services.d/php-fpm/run | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grocy/rootfs/etc/services.d/php-fpm/run b/grocy/rootfs/etc/services.d/php-fpm/run index e68f866..99f583c 100644 --- a/grocy/rootfs/etc/services.d/php-fpm/run +++ b/grocy/rootfs/etc/services.d/php-fpm/run @@ -3,6 +3,7 @@ # Home Assistant Community Add-on: Grocy # Runs the PHP-FPM daemon # ============================================================================== +declare mealday export GROCY_CULTURE export GROCY_CURRENCY export GROCY_ENTRY_PAGE @@ -46,8 +47,8 @@ if bashio::config.false 'tweaks.chores_assignment'; then fi if bashio::config.has_value 'tweaks.meal_plan_first_day_of_week'; then - GROCY_MEALDAY=$(bashio::config 'tweaks.meal_plan_first_day_of_week') - export GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK=${GROCY_MEALDAY} + mealday=$(bashio::config 'tweaks.meal_plan_first_day_of_week') + export GROCY_MEAL_PLAN_FIRST_DAY_OF_WEEK=${mealday} fi if bashio::config.false 'tweaks.multiple_shopping_lists'; then From 047669da37aaa8e10594dd92ecaa39f106c912c1 Mon Sep 17 00:00:00 2001 From: Paul Sinclair Date: Sun, 1 Mar 2020 14:21:26 -0500 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=93=9AUpdate=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index c8f3f84..b2eb581 100755 --- a/README.md +++ b/README.md @@ -194,6 +194,12 @@ The following sub features can be enabled or disabled: Set it `true` to enable it, `false` otherwise. +The following sub features can be set to specify a day (0-6), where 0 would +equal Sunday: + +- `calendar_first_day_of_week` +- `meal_plan_first_day_of_week` + ## Known issues and limitations - Grocy support to provide custom lookup resources to lookup information From 9d3222f4ef4380d65ef4fe94f4a45c33451f9587 Mon Sep 17 00:00:00 2001 From: Paul Sinclair Date: Sun, 1 Mar 2020 14:27:28 -0500 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=94=A8Add=20Calendar=20Day=20of=20wee?= =?UTF-8?q?k=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- grocy/config.json | 1 + grocy/rootfs/etc/services.d/php-fpm/run | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/grocy/config.json b/grocy/config.json index dcfefee..6087637 100755 --- a/grocy/config.json +++ b/grocy/config.json @@ -63,6 +63,7 @@ "tasks": "bool" }, "tweaks": { + "calendar_first_day_of_week": "int(0,6)?", "chores_assignment": "bool", "meal_plan_first_day_of_week": "int(0,6)?", "multiple_shopping_lists": "bool", diff --git a/grocy/rootfs/etc/services.d/php-fpm/run b/grocy/rootfs/etc/services.d/php-fpm/run index 99f583c..d703fa5 100644 --- a/grocy/rootfs/etc/services.d/php-fpm/run +++ b/grocy/rootfs/etc/services.d/php-fpm/run @@ -3,6 +3,7 @@ # Home Assistant Community Add-on: Grocy # Runs the PHP-FPM daemon # ============================================================================== +declare caldayweek declare mealday export GROCY_CULTURE export GROCY_CURRENCY @@ -42,6 +43,11 @@ if bashio::config.false 'features.tasks'; then export GROCY_FEATURE_FLAG_TASKS=0 fi +if bashio::config.has_value 'tweaks.calendar_first_day_of_week'; then + caldayweek=$(bashio::config 'tweaks.calendar_first_day_of_week') + export GROCY_CALENDAR_FIRST_DAY_OF_WEEK=${caldayweek} +fi + if bashio::config.false 'tweaks.chores_assignment'; then export GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS=0 fi