When the baby goes down, the last thing you want is a motion-triggered hallway light, a doorbell chime routine, or a
“welcome home” announcement waking them back up. This recipe gives you a single toggle, Baby sleeping, that quiets
the whole house at once and puts it back exactly as it was when the baby wakes.
How it works
Selora AI creates a Baby sleeping toggle (a Home Assistant input_boolean helper). You can flip it from a
dashboard card, a voice command, or a scheduled bedtime. If you want a physical button by the crib, wire it to the
toggle with a small automation of your own; the recipe deliberately doesn’t claim a button so it stays hardware-free.
When you turn it on, Selora AI snapshots the current on/off state of every automation in your home, then disables them. When you turn it off, it restores that snapshot, so any automation you had already paused stays paused and everything else comes back. Nothing is left guessing.
Adding the toggle to your dashboard
During install, the recipe offers to drop a tap-to-toggle Baby sleeping button straight onto a dashboard — pick
which dashboard, or skip and add it yourself later. To add it by hand:
- Open the dashboard, then Edit dashboard (top-right pencil) and + Add card.
- Choose the Entity or Button card.
- Set the entity to
input_boolean.baby_sleeping. - Save. Tapping the card now flips quiet hours on and off.
Prefer hands-free? Say “turn on Baby sleeping” to a voice assistant, or add a time-based automation that flips the toggle at your usual bedtime. Any of these drive the same helper.
Keeping safety automations alive
Turning off every automation would also turn off the ones that protect the house. Selora AI never disables automations you mark as critical.
In Home Assistant, add the label critical (configurable) to any automation that must keep running while the baby
sleeps: smoke and CO alarms, water leak shutoffs, security and intrusion responses, freezer and sump-pump alerts.
Those stay armed. Everything else goes quiet.
If you have not labeled anything yet, the recipe still installs, but treat the first quiet-hours toggle as a test: confirm your smoke and security automations are labeled before you rely on it overnight.
Files Selora AI's pipeline reads to install this recipe. The manifest declares roles, inputs, and integrations; the package files are Jinja-templated YAML applied to Home Assistant.
# Baby Sleep Quiet Hours — one toggle silences the house, except the
# safety automations the homeowner has marked critical.
#
# The recipe owns a single helper, ``input_boolean.baby_sleeping``.
# Turning it on snapshots the current state of every automation and
# disables them; turning it off restores the snapshot. Automations
# carrying the configured HA label (default ``critical``) are never
# touched, so smoke / CO / security / leak responses stay armed.
#
# The recipe's own control automations exclude themselves by ``id`` so
# the toggle can never disable the thing that turns it back on.
slug: baby-sleep-quiet-hours
version: 1.1.1
title: Baby Sleep Quiet Hours
tagline: Flip one toggle when the baby goes down and the whole house goes quiet, except the safety automations you've marked critical.
description: >-
Creates a Baby sleeping toggle. Turning it on snapshots and disables
every automation in the home; turning it off restores them to exactly
the state they were in. Automations labeled critical in Home Assistant
are never disabled, so smoke, CO, leak, and security responses keep
running while the baby sleeps.
author: Selora AI
released: "2026-06-26"
tags: [comfort, sleep, quiet-hours]
# No device roles. The recipe's only control surface is the
# input_boolean.baby_sleeping helper it creates, driven from a dashboard
# card, voice assistant, or bedtime schedule. A physical button is left to
# the homeowner: HA wireless buttons are event-domain entities that the
# role schema can't target cleanly, and surfacing every sensor as a
# candidate is worse than offering nothing.
inputs:
# HA label that marks automations as too important to silence. The
# control automation reads label_entities(<critical_label>) at runtime,
# so the homeowner manages the allow-list in HA's UI, not the recipe.
- id: critical_label
type: string
label: Critical automation label
description: >-
Automations carrying this Home Assistant label are never disabled
during quiet hours. Add it to smoke, CO, leak, and security
automations. Defaults to "critical".
default: "critical"
package_files:
- package/helpers/baby_sleeping.yaml.j2
- package/automations/silence.yaml.j2
- package/automations/restore.yaml.j2
# The recipe's only control surface is the helper it creates, so the
# install drops a tap-to-toggle button for it onto a dashboard rather
# than leaving the homeowner to add a card by hand. The wizard lets them
# pick which dashboard or skip; ``default`` targets the default one. No
# placeholders — the helper id is fixed by the recipe.
dashboard:
card:
type: button
entity: input_boolean.baby_sleeping
name: Baby sleeping
icon: mdi:sleep
show_state: true
tap_action:
action: toggle
target: default
view: 0
{# Quiet hours OFF. When the Baby sleeping toggle flips off, replay the
snapshot taken at the start of quiet hours. scene.turn_on restores each
automation to the on/off state it held before, so an automation the
homeowner had already paused stays paused and everything else comes
back. The condition guards the first-ever wake, before any snapshot
exists. #}
automation:
- id: selora_recipe_{{ slug | replace('-', '_') }}_restore
alias: "Baby sleep — restore automations"
description: >-
On wake, restore every automation to the state captured when quiet
hours began.
mode: single
trigger:
- platform: state
entity_id: input_boolean.baby_sleeping
to: "off"
condition:
- condition: template
value_template: "{% raw %}{{ 'scene.baby_sleep_snapshot' in (states.scene | map(attribute='entity_id') | list) }}{% endraw %}"
action:
- service: scene.turn_on
target:
entity_id: scene.baby_sleep_snapshot
{# Quiet hours ON. When the Baby sleeping toggle flips on, snapshot the
current on/off state of every automation, then disable them.
Two automations are never disabled:
1. This recipe's own control automations, excluded by their ``id``
prefix so quiet hours can never turn off the thing that turns it
back on.
2. Anything carrying the homeowner's critical label, read at runtime
via label_entities() so the allow-list lives in HA's UI.
``critical_label`` is substituted at install time from the recipe
input; everything inside {% raw %} is Home Assistant's own templating,
evaluated live on the box. #}
automation:
- id: selora_recipe_{{ slug | replace('-', '_') }}_silence
alias: "Baby sleep — silence automations"
description: >-
Snapshot every automation's state, then disable all of them except
this recipe's controllers and any automation labeled critical.
mode: single
trigger:
- platform: state
entity_id: input_boolean.baby_sleeping
to: "on"
action:
- variables:
targets: >-
{% raw %}{% set controllers = [
'selora_recipe_{% endraw %}{{ slug | replace('-', '_') }}{% raw %}_silence',
'selora_recipe_{% endraw %}{{ slug | replace('-', '_') }}{% raw %}_restore'
] %}
{% set keep = label_entities('{% endraw %}{{ inputs.critical_label }}{% raw %}') %}
{{ states.automation
| rejectattr('attributes.id', 'in', controllers)
| map(attribute='entity_id') | list
| reject('in', keep) | list }}{% endraw +%}
- service: scene.create
data:
scene_id: baby_sleep_snapshot
snapshot_entities: "{% raw %}{{ targets }}{% endraw %}"
- service: automation.turn_off
target:
entity_id: "{% raw %}{{ targets }}{% endraw %}"
data:
stop_actions: false
{# The quiet-hours toggle. A plain input_boolean so it can be driven
from a dashboard card, a voice assistant, a bedtime schedule, or the
optional nursery button. The control automations key off its state. #}
input_boolean:
baby_sleeping:
name: Baby sleeping
icon: mdi:sleep
Author-maintained release notes. Each release of the recipe lists what changed.
Changelog
v1.1.1 - 2026-06-26
- Fixes the silence/restore automations failing to load (“extra keys not
allowed” / missing action). A
{% endraw %}at the end of a line was swallowing the following YAML into a template string under the renderer’strim_blocks. The snapshot/restore steps now render correctly.
v1.1.0 - 2026-06-24
- Adds a
dashboard:block so the install offers to drop a tap-to-toggleBaby sleepingbutton onto a dashboard. The wizard lets you pick which dashboard or skip — no more adding the card by hand.
v1.0.0 - 2026-06-24
Initial release.
- Creates a
Baby sleepingtoggle (input_boolean.baby_sleeping). - On toggle-on, snapshots every automation’s state and disables them.
- On toggle-off, restores the snapshot so previously paused automations stay paused and everything else comes back.
- Never disables automations carrying the configured critical label
(default
critical), nor the recipe’s own control automations.