Use generic types when your automation should work with any device in a category. Use brand-specific types when you need the exact action union or model-specific fields.
// Generic — works with any motion sensorimporttype{OccupancyPayload}from"@ts-ha/core";const{occupancy}=payloadasOccupancyPayload;// Brand-specific — includes motion_sensitivity and other Hue-specific fieldsimporttype{PhilipsHueMotionSensorPayload}from"@ts-ha/core";
A capability declares its on/off encoding through valueOn/valueOff;
DeviceState is the Zigbee payload type whose "ON"/"OFF" values those
mirror. The device command endpoints
(POST /api/device-catalog/:qualifiedId/command and
POST /api/rooms/:id/command) accept a boolean property as either a real
boolean or the capability's declared value, and dispatch it in that declared
encoding — see API Reference.
If you need types for a device not listed here, open a pull request or file an issue. The type files live under packages/shared/src/types/ — each file is focused on a brand or category and follows the naming conventions documented in AGENTS.md.