You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kiosk_set_screensaver_mode ignored: mode is not passed through by the notification parser #6001
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:
Activity