Swipe repeats DPAD every REPEAT_MS, so routing it through _wakeScreen
fired turnOnScreen ~5x/sec for the whole gesture. _sendCommand takes a
wake flag; the repeat path opts out. Pad taps, buttons, apps and volume
still wake. Tradeoff: a swipe on an already-blanked panel no longer
wakes it — tap first.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
turnOnScreen is not idempotent: webOS rejects with -102 "The current
state must be Screen Off" when the panel is already lit, so every press
on an awake TV raised an error toast. _wakeScreen still fires
unconditionally (_screenOn is stale after a server-side blank), but the
rejection is now the expected no-op path: notifyOnError=false suppresses
the toast and .catch() absorbs the promise. Downside: genuine failures
(TV unreachable) go quiet too; the command that follows surfaces those.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Idle automation blanks panel via webostv turnOffScreen (backlight off,
media_player stays "on"). Any remote/app/volume press now fires
turnOnScreen first so command isn't sent to a black screen. Power button
excluded (manages own state). Unconditional — card _screenOn is stale
after server-side blank.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>