From c463ef279adcd4d1d668eb8edca1b9d4860c33bd Mon Sep 17 00:00:00 2001 From: Tom Matheussen Date: Tue, 22 Jun 2021 20:23:24 +0200 Subject: [PATCH] Added info on how the Sensor in HA is created (#584) --- .../documentation/community-guide/home-assistant.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/docs/documentation/community-guide/home-assistant.md b/docs/docs/documentation/community-guide/home-assistant.md index 0937489a..85b9213c 100644 --- a/docs/docs/documentation/community-guide/home-assistant.md +++ b/docs/docs/documentation/community-guide/home-assistant.md @@ -29,6 +29,19 @@ style: } ``` +The sensor that gets the name of the meal can be achieved using the following REST sensor in Home Assistant +```yaml +sensor: + - platform: rest + resource: 'http://localhost:9000/api/meal-plans/today' + method: GET + name: Mealie todays meal + headers: + Authorization: Bearer MySuperSecretBearerCode + value_template: "{{ value_json.name }}" +``` +The Bearer token can be created from the User Settings page (https://hay-kot.github.io/mealie/documentation/users-groups/user-settings/#api-key-generation) + !!! tip Due to how Home Assistant works with images, I had to include the additional styling to get the images to not appear distorted. This includes and [additional installation](https://github.com/thomasloven/lovelace-card-mod) from HACS.