import { ColorTemperatureLightDevice, ExtendedColorLightDevice } from '@matter/node/devices';
import { add, MappingRegistry } from './MappingRegistry.js';

//Family: Family.Insteon,
//@ts-ignore
let map = add({ Family: 'ZigBee' }).add({
	ExtendedColorLight: {
		deviceType: ExtendedColorLightDevice,
		mapping: {
			colorControl: {
				attributes: {
					colorTemperatureMireds: 'colorXY.colorTemperatureMired'
				}
			},
			onOff: {
				attributes: {
					onOff: { driver: 'onOff.status', converter: 'Percent.Boolean' }
				}
			},
			levelControl: {
				attributes: {
					currentLevel: { driver: 'onOff.status', converter: 'Percent.LightingLevel' }
				}
			}
		}
	}
});

//@ts-ignore
MappingRegistry.register(map);
