log(feature)
en entrée de sendState (https://github.com/cicoub13/Gladys/blob/feat-homekit-motion-sensor-2/server/services/homekit/lib/sendState.js#L17)
{
id: '8594204f-1251-4f38-9eba-cfebba5c3823',
device_id: 'ffeb673a-b765-480d-a785-6022df1411e2',
name: 'Détection mouvement Oui/Non',
selector: 'zigbee2mqtt-0x00158d0006f2500d-motion-sensor-binary-occupancy',
external_id: 'zigbee2mqtt:0x00158d0006f2500d:motion-sensor:binary:occupancy',
category: 'motion-sensor',
type: 'binary',
read_only: true,
keep_history: true,
has_feedback: false,
unit: null,
min: 0,
max: 1,
last_value: 1,
last_value_string: null,
last_value_changed: 2023-10-20T13:01:20.659Z,
last_hourly_aggregate: 2023-10-20T10:00:00.000Z,
last_daily_aggregate: 2023-10-19T22:00:00.000Z,
last_monthly_aggregate: 2023-09-30T22:00:00.000Z,
created_at: 2023-10-12T06:29:40.550Z,
updated_at: 2023-10-20T10:38:57.691Z
}
log(event)
en entrée du case Sensor (https://github.com/cicoub13/Gladys/blob/feat-homekit-motion-sensor-2/server/services/homekit/lib/sendState.js#L29)
{
type: 'device.new-state',
device_feature: 'zigbee2mqtt-0x00158d0006f2500d-motion-sensor-binary-occupancy',
previous_value: 1,
last_value: 1,
last_value_changed: 2023-10-20T13:01:20.659Z
}
log(Service[mappings[feature.category].service)
au même endroit
[Function: MotionSensor] {
UUID: '00000085-0000-1000-8000-0026BB765291'
}
log(Characteristic[mappings[feature.category].capabilities[feature.type].characteristics[0]])
au même endroit
[Function: MotionDetected] {
UUID: '00000022-0000-1000-8000-0026BB765291'
}