Skip to content

Repository of some of my automations, integrations, scripts and other HA related code.

Notifications You must be signed in to change notification settings

benjamin-dcs/home-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

image

In this repository I provide Automations, Integrations, Scripts and other files for Home Assistant.

Notes

  • The code in this repo is often a slightly modified (and untested) version of my personal version. In case of any issues, feel free to create an issue
  • As I am Dutch, some files will contain Dutch text. My guess is that most of you should be able to find your way to Google Translate ;)

Table of Contents

Uses a Home Assistant calender to send several notifications for someone's birthday. For Calendar events ending with (YYYY) (including the brackets) the age is calculated and added to the notification.

Features:

  • Sends a notification at 12:00 2 days prior to the birthday
  • Sends a notification at 12:00 1 day prior to the birthday
  • Sends a notification every hour, starting at day of birth until the notification is Marked as done (You have send a celebration message to the person πŸŽ‰).

Prerequisites:

  • Switch Helper: input_boolean.birthday_celebration_sent

Dependencies:

Generic Automation to handle all my Actionable Notifications.

Simple automation to purge entites after 1, 3 or 7 days.

Tip! Use a tool like DbStats to analyse your Home Assistant Database. Use the automation for entities that use a lot of disc-space to keep your database as small as possible.

Robust automation to control a light based on motion and illuminance.

Features:

  • Keep the light on for xx seconds (input_number.illuminace_threshold_motion_sensors) after no motion is detected anymore
  • Multiple short-running trigger to turn on and off the light. No waiting (running automations) between turn on and turn off.
  • Will keep the light and on reset the timer when motion is detected again (between 'no motion detected' and 'turn light off')
  • Turn light off when HA restarts

Prerequisites:

  • Timer Helper: timer.light_turn_off
  • Input Number Helper: input_number.illuminace_threshold_motion_sensors

Addons

Multiple 'Official Zigbee2MQTT Home Assistant addons'

Multiple forks from the Official Zigbee2MQTT Home Assistant addon for running multiple coordinators. The forks are automatically synced with the base repository.

I'm able to succesfully add multiple repositories in the addons store: image

For further instructions you can follow these Youtube tutorials. For the url's use the list above:

Provides a user friendly (visual editor) interface to send a notification to one or multiple notification providers, including Home Assistant Persistent Notifications.

Features:

  • (Multi-)Selector for Notification Service(s)
  • Templatable message field
  • Templatable title field
  • Data object
  • Templatable url field

Screenshot:

image

Provides a user friendly (visual editor) interface to get a ChatGPT response.

Features:

  • Templatable prompt field
  • Selector for language
  • Templatable instruction field
  • Selector for ChatGPT model. The model(s) should be exactly the same as your OpenAI Conversation entity. For example model gpt_4o_mini uses conversation.gpt_4o_mini as conversation agent.

Screenshot:

In the majority of my use-cases for a ChatGPT response, I store the result in a Text-Helper. I then use this Text-Helper as the source for my Automation/Script when it runs. At the end of the Automation/Script, I run this Set Input Text with ChatGPT-script to renew the Text-Helper. This has two advantages:

  • No extra wait-time from ChatGPT before I need the response. For example, in my doorbell automation I want the notifcation to be send as quickly as possible.
  • When ChatGPT isn't responding for whatever reason, my automation/script will still continue to run because the text is already stored.

Features:

  • Templatable prompt field
  • Selector for language
  • Templatable instruction field
  • Selector for ChatGPT model.
  • Entity-Selector
  • Remove First And Last Quotes Switch. For some prompts, ChatGPT's response is quoted. This option removes the first and last quote from the response.

Screenshot:

Dependencies:

Genereert ludieke teksten met ChatGPT voor je smart speaker om af te spelen om het moment dat je 'afsluit'

Geeft leuke teksten als:

  • Dat was weer een geweldig moment met mij. Vergeet niet, zonder mij is je leven gewoon een beetje minder leuk. Tot ziens!
  • Nou, wat een eer dat je mij gaat uitschakelen. Geniet van de stilte, ik weet dat je me mist.
  • Dank voor je gezelschap! Denk aan me als je weer in de stilte van je eigen keuzes zit. Tot nooit!
  • Tot de volgende keer, wanneer je weer mijn geniale stem nodig hebt. Vergeet me niet te missen!
  • Bedankt voor het luisteren, maar ik moet je verlaten. Jij hebt tenslotte ook rust nodig van mijn genialiteit. Tot nooit!

Dependencies:

Snippet with a success and fail path for a wait for trigger action

Based on other cards from the community. I improved the readable text.

image

Features:

  • Uses auto-entities card from HACS to sort the upcoming dates for the HACS afvalwijzer integration
  • Readable (πŸ‡³πŸ‡±) sentence for the upcoming pickup dates
    • Vandaag
    • Morgen
    • Overmorgen
    • Aanstaande <dag>
    • Volgende week <dag>
    • <dag> over <xx> week/weken

Prerequisites:

  • auto-entities card from HACS:

    Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

image

Features:

  • Adjust the begin and end of the x-axis of your ApexChart to the sunrise and sunset times

Prerequisites:

  • Config Template Card from HACS:

    Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

image

Probably requires some tweaking of the grid-template-columns percentages in order to get right on your own dashboard/screen

image

Prerequisites:

  • card-mod from HACS:

    Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

  • layout-card from HACS:

    Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Support

Buy Me A Coffee

About

Repository of some of my automations, integrations, scripts and other HA related code.

Resources

Stars

Watchers

Forks

Sponsor this project