Silence Mode, Baby Sleeping, Night, and Guests: When the House Should Be Quiet

Module 22 · Lesson 12

Silence Mode, Baby Sleeping, Night, and Guests: When the House Should Be Quiet

input_boolean.house_silence from Lesson 1 has so far been a simple on/off switch. This lesson expands it into a full system: automatic night silence, manual "baby sleeping" silence, and different silence levels for different situations.

Budget around 70 minutes. This lesson extends the foundation from Lesson 1, rather than building something from scratch.

A Real-Life Problem: Silence Turned On Manually, Forgotten the Next Day

You turn on silence in the evening because the baby just fell asleep. In the morning you forget to turn it off: a laundry-done announcement at noon never comes through, because silence is still active from the previous evening. The reverse scenario also happens: automatic night silence turns off at a fixed hour, but that particular night the baby sleeps in longer than usual, and a mail announcement wakes the baby at 7:15am even though silence normally ends at 7am.

Two Sources of Silence: Automatic and Manual

input_boolean.house_silence stays the single switch read by every announcement script, but now it's driven by two independent sources: a time-based automation (night) and a manual switch (baby sleeping, guests). The key rule: silence turns on from either source, but only turns off once both sources simultaneously allow sound.

input_boolean:
  manual_silence_baby_sleeping:
    name: "Manual silence: baby sleeping"
    icon: mdi:baby-face-outline
    initial: false

input_datetime:
  night_silence_from:
    name: "Night silence from"
    has_date: false
    has_time: true
    initial: "22:00:00"
  night_silence_until:
    name: "Night silence until"
    has_date: false
    has_time: true
    initial: "07:00:00"

A Combining Sensor: Merged Silence

template:
  - binary_sensor:
      - name: "Should be quiet"
        unique_id: should_be_quiet
        state: >
          {% set now_time = now().strftime('%H:%M:%S') %}
          {% set from_t = states('input_datetime.night_silence_from') %}
          {% set until_t = states('input_datetime.night_silence_until') %}
          {% set in_night_window = (from_t < until_t and from_t <= now_time < until_t)
             or (from_t > until_t and (now_time >= from_t or now_time < until_t)) %}
          {{ in_night_window or is_state('input_boolean.manual_silence_baby_sleeping', 'on') }}

automation:
  - alias: "House silence: sync with combined sensor"
    id: silence_sync_with_combined_sensor
    mode: single
    triggers:
      - trigger: state
        entity_id: binary_sensor.should_be_quiet
    actions:
      - action: input_boolean.turn_{{ 'on' if trigger.to_state.state == 'on' else 'off' }}
        target:
          entity_id: input_boolean.house_silence

The template sensor should_be_quiet combines the night window (handling the midnight-crossing case, where the "from" hour is later than the "until" hour) with the manual "baby sleeping" switch: the result is true if either condition holds. The automation syncs input_boolean.house_silence with this sensor, so you never have to remember to turn it off manually in the morning: silence ends automatically once neither source still requires it.

Manual "baby sleeping" silence still needs to be turned off manually
The combined sensor solves the "forgotten night silence" problem (the automatic time window), but not the "forgotten manual baby-sleeping switch" problem: if you turn it on mid-day for a nap, it won't turn itself off. Consider adding an automation with a time limit, for example an automatic turn-off after three hours, for extra protection against forgetting it.

Automatically Turning Off Manual Silence After a Time Limit

automation:
  - alias: "Manual silence: turn off automatically after 3 hours"
    id: manual_silence_auto_off_3h
    mode: single
    triggers:
      - trigger: state
        entity_id: input_boolean.manual_silence_baby_sleeping
        to: "on"
        for:
          hours: 3
    actions:
      - action: input_boolean.turn_off
        target:
          entity_id: input_boolean.manual_silence_baby_sleeping
      - action: script.home_announcement
        data:
          message: "Baby-sleeping silence turned off automatically after three hours"

Silence Mode Versus Do Not Disturb on Individual Ecosystems

It's worth distinguishing silence at the Home Assistant level (blocking TTS announcements and audible notifications) from the Do Not Disturb mode set directly on a phone or in a speaker's app. The two mechanisms operate independently of each other: a phone in DND mode can still receive a voice announcement from a speaker in the baby's room if Home Assistant itself doesn't know that silence is currently in effect. That's why the silence-mode helper in this lesson is the overarching, explicit condition checked by every announcement automation across the whole system, independent of individual devices' DND settings.

Automatic Silence by Calendar: Remote Work and Meetings

Beyond the manual and scheduled silence modes described in this lesson, it's worth considering an integration with a calendar (Google Calendar, for example) that automatically turns on silence mode for the duration of scheduled online meetings. Home Assistant exposes a calendar integration as a calendar entity, whose state (whether an event is currently in progress) can be a direct trigger for a silence automation, eliminating the need to manually remember to mute the house before every meeting.

Exceptions to Silence Mode: Critical Alerts Always Break Through

Silence mode should never mute safety alerts
No matter how elaborate your silence mode becomes, the critical announcements (flood, smoke, a gate open at night) covered in Lesson 14 of this module must always carry the highest priority, breaking through even an active silence mode. In practice, this means the critical_announcement script must explicitly not respect the silence helper's state, unlike ordinary, routine announcements.

Different Silence Schedules: Weekday Versus Weekend

A silence schedule suited to a weekday (silence from 10pm, say, because of an early start for work) doesn't necessarily fit the weekend, when household members might want to use multimedia longer in the evening but also sleep in later in the morning. An input_datetime helper parameterized separately for weekdays and the weekend, checked in the automation through a simple day-of-week condition, avoids one rigid schedule for the entire week, accurately reflecting the household's actual rhythm.

A Visual Indicator of Active Silence Mode for Household Members

Silence mode running in the background with no visible indicator can be confusing: a household member unaware silence is active might wonder why a voice announcement never played. A simple indicator, a dedicated LED by the entryway, or a status shown on the wall tablet from Lesson 7, clearly signaling silence mode active, removes that ambiguity and lets you decide consciously whether it's worth turning off at that moment.

Silence Mode and Household Members Working Shifts

The standard silence schedule assumes a typical daily rhythm (work in the morning, sleep at night), but a household member working night shifts needs a reversed schedule: silence during the day, normal activity at night. The solution is a separate silence profile tied to a specific person (through the person entity), activated independently of the house's main schedule, respecting that one individual's daily rhythm without muting the whole house for everyone else.

Selective Silence: Muting Only Certain, Non-Essential Channels

A full silence mode, muting every announcement except the critical ones, can be overkill in some situations: during an online meeting it's worth muting routine informational announcements, while keeping full volume for a gate alert or a doorbell you need to react to even mid-meeting. A more granular selective silence mode, muting only chosen categories of announcements, gives you more control than a binary on/off.

How to Test This Lesson

1. Set the night silence window a few minutes from now and check that input_boolean.house_silence turns on and off automatically.

2. Turn on manual "baby sleeping" silence mid-day and confirm silence holds even outside the night window.

3. Verify the automatic time-limited shutoff of manual silence (temporarily shorten it for the test).

Common Mistakes

A simple time condition without midnight-crossing handling: a 10pm to 7am window computed incorrectly.

Manually turning silence off instead of syncing with the sensor: silence ends prematurely, even though it's still night.

No time limit on manual silence: a forgotten switch blocks announcements for the entire day.

Practical Task

☐ Configure input_datetime helpers for the night silence window.

☐ Build the should_be_quiet template sensor and the sync automation.

☐ Add an automatic time-limited shutoff for manual silence.

Key Takeaways

Silence combined from two sources: an automatic night window and a manual switch.

A template sensor eliminates the need to manually turn off night silence every morning.

A time limit on manual silence guards against a forgotten switch.

What's Next

Next lesson: Control Without a Phone: Remotes, Buttons, TV Dashboard, Tablet, Voice, and Automations. Multimedia for people who don't have a phone within reach.

Finished this lesson?