Skip to content

command_dnd / command_ringer_mode always rejected as "Invalid DND command" regardless of value (minimal flavor, 2026.6.5, Android 15 Modes) #7165

Description

@3ventHori7on

Description

command_dnd and command_ringer_mode notification commands are rejected as invalid regardless of the value sent, even when Do Not Disturb / Modes access is granted (including force-granting via adb shell cmd notification allow_dnd <package>).

Environment

  • App: io.homeassistant.companion.android.minimal, version 2026.6.5-minimal
  • Home Assistant server: 2026.7.1
  • Device: Google Pixel 9a, GrapheneOS, Android 15+ (system uses the "Modes access" special-app-access screen, i.e. the post-Android-15 DND/Modes redesign)

Steps to reproduce

Send a notify.mobile_app_<device> service call with message: command_dnd and each of the following data.dnd_mode values, one at a time:

priority, priority_only, all, none, alarms_only, alarms, off, on, total_silence

Every single value is rejected. adb logcat shows, for every attempt:

MessagingManager$handleMessage: Processing device command
MessagingManager$handleMessage: Invalid DND command received, posting notification to device

command_ringer_mode shows the identical failure pattern (Invalid ringer mode command received, posting notification to device) — same code path appears affected.

Permission was confirmed granted, not the cause

  • Verified in Settings → Apps → Special app access → Modes access → Home Assistant → allowed.
  • Also explicitly re-granted via adb shell cmd notification allow_dnd io.homeassistant.companion.android.minimal (exit code 0) — no change in behavior.

OS-level DND/ringer control works fine on the same device

To rule out a device/OS-level problem, the equivalent OS commands were run directly and both worked instantly and correctly:

adb shell cmd notification set_dnd priority   # zen_mode → 1 immediately
adb shell cmd audio set-ringer-mode SILENT    # ringer mode → SILENT immediately

This narrows the issue to the app's own command validation/dispatch logic for command_dnd/command_ringer_mode, not the underlying Android DND/ringer APIs, and not the permission grant.

Suspected cause

Given the app package name embeds Kotlin constants DND_ALARMS_ONLY, DND_ALL, DND_NONE, DND_PRIORITY_ONLY (found via string inspection of the installed APK) but none of the plausible corresponding string values were accepted, this looks like either a broken/renamed value comparison, or a permission-detection check that fails silently under the Android 15 Modes redesign in the minimal (no Google Play Services) build specifically — happy to help narrow this down further if useful, e.g. by testing the full flavor for comparison if that'd help isolate whether it's minimal-flavor-specific.

Workaround in use

Direct adb shell cmd notification set_dnd / adb shell cmd audio set-ringer-mode via a local automation, bypassing the companion app's DND commands entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions