Skip to content

Commit

Permalink
apps/homeassistant: test new meals sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Oct 15, 2023
1 parent 4d2e3a6 commit b584118
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 1 deletion.
38 changes: 38 additions & 0 deletions apps/homeassistant/config/configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,44 @@ sensor:
{% endfor %}
{% endif %}
- platform: rest
name: meals_today
scan_interval: 3600
headers:
content-type: application/json
authorization: !secret recipes_token
resource: https://recipes.krupa.net.pl/api/meal-plan
params:
from_date: >
{{ now().strftime("%Y-%m-%d") }}
to_date: >
{{ now().strftime("%Y-%m-%d") }}
json_attributes_path: "$.[0]"
json_attributes:
- date
- meal_type_name
- title
- recipe_name

- platform: rest
name: meals_tomorrow
scan_interval: 3600
headers:
content-type: application/json
authorization: !secret recipes_token
resource: https://recipes.krupa.net.pl/api/meal-plan
params:
from_date: >
{{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
to_date: >
{{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
json_attributes_path: "$.[0]"
json_attributes:
- date
- meal_type_name
- title
- recipe_name

#- name: we_wash_w1
# platform: imap_email_content
# server: imap.gmail.com
Expand Down
38 changes: 38 additions & 0 deletions apps/homeassistant/manifests/homeassistant/configs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,44 @@ data:
{% endfor %}
{% endif %}
- platform: rest
name: meals_today
scan_interval: 3600
headers:
content-type: application/json
authorization: !secret recipes_token
resource: https://recipes.krupa.net.pl/api/meal-plan
params:
from_date: >
{{ now().strftime("%Y-%m-%d") }}
to_date: >
{{ now().strftime("%Y-%m-%d") }}
json_attributes_path: "$.[0]"
json_attributes:
- date
- meal_type_name
- title
- recipe_name
- platform: rest
name: meals_tomorrow
scan_interval: 3600
headers:
content-type: application/json
authorization: !secret recipes_token
resource: https://recipes.krupa.net.pl/api/meal-plan
params:
from_date: >
{{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
to_date: >
{{ (now().date() + timedelta(days=1)).strftime("%Y-%m-%d") }}
json_attributes_path: "$.[0]"
json_attributes:
- date
- meal_type_name
- title
- recipe_name
#- name: we_wash_w1
# platform: imap_email_content
# server: imap.gmail.com
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: 186af01be41ae4a1ee8806dfa07fe137
checksum.config/md5: e66574d59851089e3da719e8a05628f6
labels:
app.kubernetes.io/component: server
app.kubernetes.io/name: homeassistant
Expand Down

0 comments on commit b584118

Please sign in to comment.