Dominevo
ReferenceDevice capabilities

pet-feeder

PetKit pet-feeder cap.

PetKit pet-feeder cap. Models the control + telemetry surface of a cloud-connected smart feeder as a single coherent slice — bowl food level, battery, desiccant life, feeding state + the four persisted settings (child-lock / indicator-light / feed-sound / volume).

Sources: native PetKit (nodepetkit FeederDevice). Reusable by any feeder integration that speaks the same food/desiccant/hopper surface.

kind: 'poll' — PetKit exposes only a cloud REST API (no push channel), so the provider refreshes the slice on a poll interval and eagerly after every command.

Dual-hopper feeders (D4S/D4SH) split the bowl into two independent hoppers. isDualHopper gates the two-hopper UI; food1/food2 carry the per-hopper levels (both null on single-hopper models, where foodLevel is the single reading). The manual-feed portion honours the PetKit hardware range 4–200 g in 1 g steps.

Device status is exposed both raw and decoded, mirroring PetKit's HA integration (RobertD502/py-petkit-api). status is the connectivity / power enum (normal / offline / on_batteries); error is the decoded human-readable fault message (null / no_error = healthy); errorCode keeps the raw device integer (0 / null = no error) so a provider that only has the numeric code stays lossless. A provider maps the library's fields onto these; any it cannot determine stays null.

PetKit manual-feed portion bounds (grams). Mirrors the HA manual_feed number entity (min 4, max 200, step 1, device_class weight).

At a glance

Capabilitypet-feeder
Provided byThe device's own driver provides it: each device registers its own provider.
Active providers per deviceone
Device typespet-feeder
Sourcepackages/types/src/capabilities/pet-feeder.cap.ts

Methods

Every method takes the device id (deviceId) to address the device; the input tables below list the other fields.

MethodKindRequired of a providerAccess
feedmutationyesprotected
cancelFeedmutationyesprotected
callPetmutationyesprotected
playSoundmutationyesprotected
resetDesiccantmutationyesprotected
markFoodReplenishedmutationyesprotected
setChildLockmutationyesprotected
setIndicatorLightmutationyesprotected
setFeedSoundmutationyesprotected
setVolumemutationyesprotected

feed

mutation

Dispense food now. Single-hopper feeders take grams; dual-hopper feeders (D4S/D4SH) accept hopper1/hopper2 to target one or both hoppers. All portions honour the 4–200 g hardware range. At least one of the three must be present — the provider rejects an empty request.

Input

FieldTypeRequiredDescription
gramsnumberno
hopper1numberno
hopper2numberno

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.feedFeed
petFeeder.feedHoppersFeed from both hoppers

cancelFeed

mutation

Cancel an in-progress manual feed.

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.cancelFeedCancel feeding

callPet

mutation

Call the pet with the recorded prompt.

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.callPetCall pet

playSound

mutation

Play a stored sound by id.

Input

FieldTypeRequiredDescription
soundIdnumberyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.playSoundPlay sound

resetDesiccant

mutation

Reset the desiccant "days remaining" counter after replacing it.

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.resetDesiccantDesiccant replaced

markFoodReplenished

mutation

Tell the PetKit cloud a hopper was refilled so it stops its low-food reminders (D4H/D4S/D4SH only — see supportsMarkRefilled). It does not change any sensor reading.

Input

No fields besides deviceId.

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.foodReplenishedFood refilled

setChildLock

mutation

Toggle the child-lock (manual-lock) setting.

Input

FieldTypeRequiredDescription
onbooleanyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.childLockOnChild lock onchildLock = true
petFeeder.childLockOffChild lock offchildLock = false

setIndicatorLight

mutation

Toggle the front indicator light.

Input

FieldTypeRequiredDescription
onbooleanyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.lightOnIndicator light onindicatorLight = true
petFeeder.lightOffIndicator light offindicatorLight = false

setFeedSound

mutation

Toggle the dispense chime.

Input

FieldTypeRequiredDescription
onbooleanyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.feedSoundOnFeeding sound onfeedSound = true
petFeeder.feedSoundOffFeeding sound offfeedSound = false

setVolume

mutation

Set the speaker / prompt volume level.

Input

FieldTypeRequiredDescription
levelnumberyes

Output

Nothing.

Actions (offered in automations and on device cards)

ActionLabelSets
petFeeder.volumeSet volumevolume = undefined

Runtime state

The state Dominevo keeps for each device with this capability, readable without calling the provider.

Runtime-state slice — mirrored by the kernel. UI feeder cards read the full slice via device.state.petFeeder.value and refresh on every poll without re-querying the provider.

FieldTypeRequiredDescription
foodLevelnumber | nullyesFood in the TANK (hopper), as the feeder's own sensor reports it (state.food). A coarse level code, not grams — 0 is empty. The amount in the bowl is bowlFood. On dual-hopper models this is the combined reading; per-hopper levels live in food1/food2. Null when the device has not reported yet.
bowlFoodnumber | nullyesFood in the BOWL, a mass. Reported only by a feeder with a bowl scale; null when the model has none or its reading is of an unproven unit.
eatingbooleanyesTrue while the pet is eating (state.eating).
supportsMarkRefilledbooleanyesWhether markFoodReplenished does anything on this model. When false the client must not offer it.
food1number | nullyesHopper-1 food level (grams) on dual-hopper feeders; null on single-hopper models.
food2number | nullyesHopper-2 food level (grams) on dual-hopper feeders; null on single-hopper models.
lowFoodbooleanyesDerived low-food flag — mirrors the HA food_level binary_sensor (device_class: problem, on = low). True when the tank reports empty, or, on a dual-hopper model, when EITHER hopper is empty.
batteryPowernumber | nullyesBattery charge 0..100 (%). On a feeder running on mains this is the BACKUP battery's charge, not the power source. Null when the device has no battery reading.
powerSource"mains" | "battery" | nullyesWhat the feeder is powered from right now: mains (plugged in, the battery is only a backup) or battery. Null when the device does not report it.
desiccantLeftDaysnumber | nullyesDesiccant life remaining, stored in seconds. Providers convert from the days the feeder reports. Null when the model has no desiccant sensor.
feedingbooleanyesTrue while a feed is in progress.
status"normal" | "offline" | "on_batteries" | nullyesDecoded connectivity / power status (HA petkit device-status enum). Null until the device has reported a status.
errorstring | nullyesDecoded human-readable fault message. Null (or the device's no_error sentinel) means healthy; a non-null string is an active fault. Pairs with errorCode for consumers that want the raw integer.
errorCodenumber | nullyesRaw device error code (0 / null = no error).
isDualHopperbooleanyesTrue for D4S/D4SH dual-hopper hardware — gates the per-hopper UI.
childLockbooleanyesChild-lock (manual-lock) setting — buttons on the unit are disabled.
indicatorLightbooleanyesFront indicator-light setting.
feedSoundbooleanyesPlay a chime when dispensing.
volumenumberyesSpeaker / prompt volume level (device-scaled integer).
lastFeedGramsnumber | nullyesPortion (grams) of the last manual feed sent from a single-hopper stepper — the default the next manual feed starts from. Persisted per device by the provider; null until a manual feed has been sent.
lastFeedHopper1number | nullyesHopper-1 portion of the last manual feed (dual-hopper); null until sent.
lastFeedHopper2number | nullyesHopper-2 portion of the last manual feed (dual-hopper); null until sent.
lastFetchedAtnumberyesMs epoch when the slice was last refreshed from the cloud.