Pebble.Events

Generic watch-side event subscriptions.

Each helper turns a platform event into a regular Elm Sub msg.

Native Pebble C API

Time

onSecondChange

onSecondChange : (Int -> msg) -> Sub msg

Receive the current second whenever the local second changes.

The value is the current wall-clock second, from 0 to 59.

onMinuteChange

onMinuteChange : (Int -> msg) -> Sub msg

Receive a message when the local minute changes.

The value is the current wall-clock minute, from 0 to 59.

onHourChange

onHourChange : (Int -> msg) -> Sub msg

Receive a message when the local hour changes.

The value is the current wall-clock hour, from 0 to 23.

onDayChange

onDayChange : (Int -> msg) -> Sub msg

Receive a message when the local day of month changes.

The value is the current day of month, from 1 to 31.

onMonthChange

onMonthChange : (Int -> msg) -> Sub msg

Receive a message when the local month changes.

The value is the current month number, from 1 to 12.

onYearChange

onYearChange : (Int -> msg) -> Sub msg

Receive a message when the local year changes.

The value is the current full year, for example 2026.

Composition

batch

batch : List (Sub msg) -> Sub msg

Combine multiple Pebble subscriptions into one.