diff --git a/.env.example b/.env.example index da069de..5903945 100644 --- a/.env.example +++ b/.env.example @@ -47,3 +47,8 @@ HOMEPAGE_VAR_BESZEL_PASSWORD=your-beszel-password # Full HTTP Basic Authorization header value (including "Basic " prefix), # base64 of ":" as provided by Patchmon HOMEPAGE_VAR_PATCHMON_AUTH=Basic base64EncodedCredentialsHere + +# --- Home Assistant widget --- +# Long-lived access token, created under your HA user profile > Security > +# Long-lived access tokens +HOMEPAGE_VAR_HOMEASSISTANT_TOKEN=your-home-assistant-long-lived-access-token diff --git a/services.yaml b/services.yaml index fbbd07b..1c03dce 100644 --- a/services.yaml +++ b/services.yaml @@ -131,6 +131,19 @@ icon: home-assistant.svg href: https://haos.vogt.de.com/ description: Home Assistant + widget: + type: homeassistant + url: https://haos.vogt.de.com + key: "{{HOMEPAGE_VAR_HOMEASSISTANT_TOKEN}}" + custom: + - template: "{% if states('input_select.hausanwesenheit') == 'Anwesend' %}🏠{% elif states('input_select.hausanwesenheit') == 'Abwesend' %}🚪{% elif states('input_select.hausanwesenheit') == 'Urlaub' %}✈️{% else %}❓{% endif %}" + label: Anwesenheit + - template: "{% if states('input_select.wohnungsstatus') == 'Normal' %}✅{% elif states('input_select.wohnungsstatus') == 'Nachtruhe' %}🌙{% elif states('input_select.wohnungsstatus') == 'Wochenende' %}🎉{% elif states('input_select.wohnungsstatus') == 'Mittagsschlaf' %}😴{% else %}❓{% endif %}" + label: Status + - state: sensor.kammer_netzbezug_plus_keller_power_calc + label: Netz + - state: sensor.solarbank_2_e1600_pro_solarleistung + label: Solar - Homematic: icon: homematic-ip.png