Automations

Block a group when you're somewhere

Ready-made Home Assistant automations for your Screen Time groups. This one blocks your Social group whenever a location sensor turns on — a bed sensor, a room presence sensor, a zone — and unblocks it again when you leave. Set your name and the sensor, copy the YAML, paste it in.

Preview shows what the automation does. Your YAML fills in from the fields.

The part before the group in switch.greg_social_blocked — the same prefix your other Phone Assistant Link entities use.

Any binary_sensor that turns on while you're in that place — a bed sensor, a room-presence sensor, or a zone turned into a binary sensor with a template.

Location blocker — YAML
  1. 1

    Set your name and location sensor, press Copy YAML.

  2. 2

    In Home Assistant: Settings → Automations & scenes.

  3. 3

    Create Automation → ⋮ → Edit in YAML.

  4. 4

    Paste the YAML, press Save.

Blocking a different group? Swap social in switch.<you>_social_blocked for your group's name. Blocking respects the group's Shield or Vanish mode, so a Vanish group's apps disappear from the Home Screen while you're in that location.