Skip to content

Commit

Permalink
apps/homeassistant: fix existing recipes sensor
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Oct 16, 2023
1 parent c38d5b5 commit fcfe6e6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
13 changes: 7 additions & 6 deletions apps/homeassistant/config/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ sensor:
from_date: >
{{ now().strftime("%Y-%m-%d") }}
to_date: >
{{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
{{ now().strftime("%Y-%m-%d") }}
# {{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
value_template: >
{% if value_json is none or value_json == [] %}
No meal plan found
Expand Down Expand Up @@ -221,6 +222,11 @@ rest:
value_template: >
{% set data = value_json | selectattr('meal_type_name', 'eq', 'Lunch') | first -%}
{{ data.title if data.title else data.recipe_name | default() }}
- name: "Today's Snack"
unique_id: "meal_today_snack"
value_template: >
{% set data = value_json | selectattr('meal_type_name', 'eq', 'Snack') | first -%}
{{ data.title if data.title else data.recipe_name | default() }}
- name: "Today's Dinner"
unique_id: "meal_today_dinner"
value_template: >
Expand All @@ -231,11 +237,6 @@ rest:
- image
- id
- name
- name: "Today's Snack"
unique_id: "meal_today_snack"
value_template: >
{% set data = value_json | selectattr('meal_type_name', 'eq', 'Snack') | first -%}
{{ data.title if data.title else data.recipe_name | default() }}

#- name: we_wash_w1
# platform: imap_email_content
Expand Down
13 changes: 7 additions & 6 deletions apps/homeassistant/manifests/homeassistant/configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ data:
from_date: >
{{ now().strftime("%Y-%m-%d") }}
to_date: >
{{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
{{ now().strftime("%Y-%m-%d") }}
# {{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
value_template: >
{% if value_json is none or value_json == [] %}
No meal plan found
Expand Down Expand Up @@ -224,6 +225,11 @@ data:
value_template: >
{% set data = value_json | selectattr('meal_type_name', 'eq', 'Lunch') | first -%}
{{ data.title if data.title else data.recipe_name | default() }}
- name: "Today's Snack"
unique_id: "meal_today_snack"
value_template: >
{% set data = value_json | selectattr('meal_type_name', 'eq', 'Snack') | first -%}
{{ data.title if data.title else data.recipe_name | default() }}
- name: "Today's Dinner"
unique_id: "meal_today_dinner"
value_template: >
Expand All @@ -234,11 +240,6 @@ data:
- image
- id
- name
- name: "Today's Snack"
unique_id: "meal_today_snack"
value_template: >
{% set data = value_json | selectattr('meal_type_name', 'eq', 'Snack') | first -%}
{{ data.title if data.title else data.recipe_name | default() }}
#- name: we_wash_w1
# platform: imap_email_content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spec:
template:
metadata:
annotations:
checksum.config/md5: c1f296e4b5b0e0dbbd0fbd7d40eb2dc0
checksum.config/md5: 04e3e5c08a9eaa39e8c97afc9f17c7af
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: homeassistant
Expand Down

0 comments on commit fcfe6e6

Please sign in to comment.