mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-02 10:01:37 +00:00
113 lines
3.4 KiB
JavaScript
113 lines
3.4 KiB
JavaScript
const homeassistant = {
|
|
'binary_sensor_occupancy': {
|
|
type: 'binary_sensor',
|
|
object_id: 'occupancy',
|
|
discovery_payload: {
|
|
payload_on: 'motion',
|
|
payload_off: 'no_motion',
|
|
value_template: '{{ value_json.occupancy }}',
|
|
device_class: 'motion',
|
|
json_attributes: ['battery']
|
|
}
|
|
},
|
|
'sensor_illuminance': {
|
|
type: 'sensor',
|
|
object_id: 'illuminance',
|
|
discovery_payload: {
|
|
unit_of_measurement: 'lx',
|
|
icon: 'mdi:theme-light-dark',
|
|
value_template: '{{ value_json.illuminance }}',
|
|
json_attributes: ['battery'],
|
|
}
|
|
},
|
|
'binary_sensor_state': {
|
|
type: 'binary_sensor',
|
|
object_id: 'state',
|
|
discovery_payload: {
|
|
payload_on: 'open',
|
|
payload_off: 'closed',
|
|
value_template: '{{ value_json.state }}',
|
|
device_class: 'door',
|
|
json_attributes: ['battery']
|
|
}
|
|
},
|
|
'light_brightness_colortemp_xy': {
|
|
type: 'light',
|
|
object_id: 'light',
|
|
discovery_payload: {
|
|
brightness: true,
|
|
color_temp: true,
|
|
xy: true,
|
|
platform: 'mqtt_json',
|
|
command_topic: true
|
|
}
|
|
},
|
|
'light_brightness_colortemp': {
|
|
type: 'light',
|
|
object_id: 'light',
|
|
discovery_payload: {
|
|
brightness: true,
|
|
color_temp: true,
|
|
platform: 'mqtt_json',
|
|
command_topic: true
|
|
}
|
|
},
|
|
};
|
|
|
|
const devices = {
|
|
'lumi.sensor_switch': {
|
|
model: 'WXKG01LM',
|
|
vendor: 'Xiaomi',
|
|
description: 'MiJia wireless switch',
|
|
supports: 'single, double, triple, quadruple, many and long click',
|
|
},
|
|
'lumi.sensor_switch.aq2': {
|
|
model: 'WXKG11LM',
|
|
vendor: 'Xiaomi',
|
|
description: 'Aqara wireless switch',
|
|
supports: 'single, double, triple, quadruple click',
|
|
},
|
|
'lumi.sens': {
|
|
model: 'WSDCGQ01LM',
|
|
vendor: 'Xiaomi',
|
|
description: 'MiJia temperature & humidity sensor ',
|
|
supports: 'temperature and humidity',
|
|
},
|
|
'lumi.sensor_motion': {
|
|
model: 'RTCGQ01LM',
|
|
vendor: 'Xiaomi',
|
|
description: 'MiJia human body movement sensor',
|
|
supports: 'occupancy',
|
|
homeassistant: [homeassistant.binary_sensor_occupancy]
|
|
},
|
|
'lumi.sensor_magnet': {
|
|
model: 'MCCGQ01LM',
|
|
vendor: 'Xiaomi',
|
|
description: 'MiJia door & window contact sensor',
|
|
supports: 'open and closed state',
|
|
},
|
|
'lumi.sensor_magnet.aq2': {
|
|
model: 'MCCGQ11LM',
|
|
vendor: 'Xiaomi',
|
|
description: 'Aqara door & window contact sensor',
|
|
supports: 'open and closed state',
|
|
homeassistant: [homeassistant.binary_sensor_state]
|
|
},
|
|
'TRADFRI bulb E27 WS opal 980lm': {
|
|
model: 'LED1545G12',
|
|
vendor: 'IKEA',
|
|
description: 'TRADFRI LED bulb E27 980 lumen, dimmable, white spectrum, opal white',
|
|
supports: 'on/off, brightness, color temperature',
|
|
homeassistant: [homeassistant.light_brightness_colortemp]
|
|
},
|
|
'LLC020': {
|
|
model: '7146060PH',
|
|
vendor: 'Philips',
|
|
description: 'Hue Go',
|
|
supports: 'on/off, brightness, color temperature, color xy',
|
|
homeassistant: [homeassistant.light_brightness_colortemp_xy]
|
|
},
|
|
}
|
|
|
|
module.exports = devices;
|