Skip to content

kiosk_set_screensaver_mode ignored: mode is not passed through by the notification parser #6001

Closed

Description

@mikesjogren

Description

Sending the kiosk remote command kiosk_set_screensaver_mode with a mode value has no effect. The screensaver mode is not changed.

Steps to reproduce

Enable kiosk mode with the screensaver enabled and Accept kiosk remote commands on.
Keep the app in the foreground.
Send:
yaml
action: notify.mobile_app_
data:
message: kiosk_set_screensaver_mode
data:
mode: clock
Check Settings > Kiosk mode > Screensaver > Mode.

Expected: Mode changes to Clock.
Actual: Mode is unchanged. No toast or notification is shown.

Likely cause

NotificationParserLegacy (Sources/SharedPush/Sources/NotificationParserLegacy.swift) explicitly passes level and volume through to the client for the kiosk commands, but not mode:

swift
// Pass kiosk command values (kiosk_set_brightness / kiosk_set_volume) through to the client.
if let level = data["level"] { payload["level"] = level }
if let volume = data["volume"] { payload["volume"] = volume }

KioskPushCommand.screensaverMode(from:) looks for mode at the top level of userInfo or under homeassistant. The top-level key is never forwarded, so mode resolves to nil and the command is dropped. The unit tests in KioskPushCommandTests pass because they call screensaverMode(from:) directly and bypass the parser.

Suggested fix

Add a passthrough for mode alongside level and volume:

swift
if let mode = data["mode"] { payload["mode"] = mode }

A parser test covering kiosk_set_screensaver_mode would also help.

Workaround

Send the value under action_data as well, since that is forwarded as homeassistant:

yaml
data:
message: kiosk_set_screensaver_mode
data:
mode: clock
action_data:
mode: clock

Environment

Companion app: 2026.9.3
iPadOS: 27.0.1
Home Assistant: 2026.9.4
Device: iPad 10th gen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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