Skip to content

Packages

Corban Mailloux edited this page Jun 27, 2023 · 8 revisions

In most cases, I've organized my configuration to use packages. This allows me to put all of the relevant devices, automations, scripts, etc. in one file for a given project. It also simplifies sharing the configuration because a reader doesn't have to copy parts from multiple files.

Packages

In my bedroom, I have fairy lights mounted on the headboard. These lights are integrated with a custom ESPHome board using an ESP32 chip to provide a light entity to HASS.

This simple package just provides an auto-off automation for these lights. See also bedroom_light_alarm below.

(See also bedroom_fairy_lights.)

Every weekday morning, this package slowly raises the brightness of our headboard lights in the bedroom over a configurable time window.

Screenshot of the Sunrise Alarm UI.

Depends on:

This package exposes a universal media player to give one main media_player entity for the Bedroom Roku. Combining the normal Roku media_player with the specific Plex player gives the most correct status and controls.

Screenshot of Bedroom Roku Remote

Depends on:

On each side of the bed, we have Zigbee remotes customized for each of us.

Maggie's remote is a 5-button IKEA Trådfri remote with these button mappings:

  • Power: Toggle the bedroom light
  • Up click: Brighten bedroom light
  • Up hold: Set bedroom light to full brightness
  • Down click: Dim bedroom light
  • Down hold: Set bedroom light to minimum brightness (but still on)
  • Left click: Toggle the bedroom fan
  • Right click: 3-state toggle for the headboard fairy lights

Corban's button is a single-button Xiaomi Aqara wireless switch with these button mappings:

  • Click: 3-state toggle for the headboard fairy lights
  • Double-click: Toggle the bedroom fan
  • Hold: Turn everything off

Depends on:

We have cats (Sasha and Maya). The litter box needs to be cleaned each day, and either human member of the household might get around to it. To remind us and to avoid duplicate efforts, both of our phones are notified at 7PM. If either notification is acknowledged and dismissed, remove the notification from both phones.

Screenshot of Android notification

Depends on:

  • Home Assistant Companion, the official app - Android, iOS

We have a Synology DS1019+ NAS device set up as a Plex media server and auto-downloader. When this system is downloading content, it could potentially slow down other devices on the network. I could put a simple schedule in place to avoid that, but automation is more fun. Here are the download rules:

  • If no one is home, download at full speed.
  • If someone is home but it's overnight, download at full speed.
  • If someone is home and it's during the normally-awake hours, throttle the download speed.

This package also exposes an input_select to manually change the download mode (including pausing downloads), and an input_boolean to disable the automatic rules above. This is especially useful when I'm working on the NAS and want to pause all downloads for multiple days.

Screenshot of NAS control card

Depends on:

With a smart thermostat and a couple door/window sensors, this package ensures that we aren't running the heat or air conditioning while a window is open. It's built using a state machine, roughly matching this flow: State Machine Diagram

This is more complicated than it could be, but I didn't want the HVAC to automatically come back on right when everything is closed. Instead, I display a dynamic card on the wall display with two options: dismiss or reset the HVAC to its previous state. Screenshot of reminder card