mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[homekit] alphabetize lists in code (#17127)
Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
parent
6b54480dac
commit
48f50aa491
@ -23,44 +23,45 @@ import java.util.Optional;
|
||||
* @author Andy Lintner - Initial contribution
|
||||
*/
|
||||
public enum HomekitAccessoryType {
|
||||
HUMIDITY_SENSOR("HumiditySensor"),
|
||||
LIGHTBULB("Lighting"),
|
||||
SWITCH("Switchable"),
|
||||
TEMPERATURE_SENSOR("TemperatureSensor"),
|
||||
THERMOSTAT("Thermostat"),
|
||||
CONTACT_SENSOR("ContactSensor"),
|
||||
VALVE("Valve"),
|
||||
LEAK_SENSOR("LeakSensor"),
|
||||
MOTION_SENSOR("MotionSensor"),
|
||||
OCCUPANCY_SENSOR("OccupancySensor"),
|
||||
WINDOW_COVERING("WindowCovering"),
|
||||
DOOR("Door"),
|
||||
WINDOW("Window"),
|
||||
SMOKE_SENSOR("SmokeSensor"),
|
||||
CARBON_MONOXIDE_SENSOR("CarbonMonoxideSensor"),
|
||||
CARBON_DIOXIDE_SENSOR("CarbonDioxideSensor"),
|
||||
ACCESSORY_GROUP("AccessoryGroup"),
|
||||
DUMMY("Dummy"),
|
||||
|
||||
AIR_QUALITY_SENSOR("AirQualitySensor"),
|
||||
BASIC_FAN("BasicFan"),
|
||||
BATTERY("Battery"),
|
||||
CARBON_DIOXIDE_SENSOR("CarbonDioxideSensor"),
|
||||
CARBON_MONOXIDE_SENSOR("CarbonMonoxideSensor"),
|
||||
CONTACT_SENSOR("ContactSensor"),
|
||||
DOOR("Door"),
|
||||
FAN("Fan"),
|
||||
LOCK("Lock"),
|
||||
SECURITY_SYSTEM("SecuritySystem"),
|
||||
OUTLET("Outlet"),
|
||||
SPEAKER("Speaker"),
|
||||
SMART_SPEAKER("SmartSpeaker"),
|
||||
FAUCET("Faucet"),
|
||||
FILTER_MAINTENANCE("Filter"),
|
||||
GARAGE_DOOR_OPENER("GarageDoorOpener"),
|
||||
HEATER_COOLER("HeaterCooler"),
|
||||
LIGHT_SENSOR("LightSensor"),
|
||||
AIR_QUALITY_SENSOR("AirQualitySensor"),
|
||||
BATTERY("Battery"),
|
||||
FILTER_MAINTENANCE("Filter"),
|
||||
FAUCET("Faucet"),
|
||||
MICROPHONE("Microphone"),
|
||||
SLAT("Slat"),
|
||||
TELEVISION("Television"),
|
||||
HUMIDITY_SENSOR("HumiditySensor"),
|
||||
INPUT_SOURCE("InputSource"),
|
||||
TELEVISION_SPEAKER("TelevisionSpeaker"),
|
||||
ACCESSORY_GROUP("AccessoryGroup"),
|
||||
IRRIGATION_SYSTEM("IrrigationSystem"),
|
||||
DUMMY("Dummy");
|
||||
LEAK_SENSOR("LeakSensor"),
|
||||
LIGHT_SENSOR("LightSensor"),
|
||||
LIGHTBULB("Lighting"),
|
||||
LOCK("Lock"),
|
||||
MICROPHONE("Microphone"),
|
||||
MOTION_SENSOR("MotionSensor"),
|
||||
OCCUPANCY_SENSOR("OccupancySensor"),
|
||||
OUTLET("Outlet"),
|
||||
SECURITY_SYSTEM("SecuritySystem"),
|
||||
SLAT("Slat"),
|
||||
SMART_SPEAKER("SmartSpeaker"),
|
||||
SMOKE_SENSOR("SmokeSensor"),
|
||||
SPEAKER("Speaker"),
|
||||
SWITCH("Switchable"),
|
||||
TELEVISION("Television"),
|
||||
TELEVISION_SPEAKER("TelevisionSpeaker"),
|
||||
TEMPERATURE_SENSOR("TemperatureSensor"),
|
||||
THERMOSTAT("Thermostat"),
|
||||
VALVE("Valve"),
|
||||
WINDOW("Window"),
|
||||
WINDOW_COVERING("WindowCovering");
|
||||
|
||||
private static final Map<String, HomekitAccessoryType> TAG_MAP = new HashMap<>();
|
||||
|
||||
|
@ -28,133 +28,108 @@ public enum HomekitCharacteristicType {
|
||||
*/
|
||||
EMPTY("Empty"), // used in case only accessory type but no characteristic provided
|
||||
|
||||
NAME("Name"),
|
||||
MANUFACTURER("Manufacturer"),
|
||||
MODEL("Model"),
|
||||
SERIAL_NUMBER("SerialNumber"),
|
||||
FIRMWARE_REVISION("FirmwareRevision"),
|
||||
HARDWARE_REVISION("HardwareRevision"),
|
||||
IDENTIFY("Identify"),
|
||||
|
||||
BATTERY_LOW_STATUS("BatteryLowStatus"),
|
||||
ACTIVE("Active"),
|
||||
ACTIVE_IDENTIFIER("ActiveIdentifier"),
|
||||
ACTIVE_STATUS("ActiveStatus"),
|
||||
ISCONFIGURED("IsConfigured"),
|
||||
SERVICELABELIDX("ServiceLabelIndex"),
|
||||
INUSE_STATUS("InUseStatus"),
|
||||
FAULT_STATUS("FaultStatus"),
|
||||
TAMPERED_STATUS("TamperedStatus"),
|
||||
OBSTRUCTION_STATUS("ObstructionStatus"),
|
||||
ON_STATE("OnState"),
|
||||
CONTACT_SENSOR_STATE("ContactSensorState"),
|
||||
|
||||
MOTION_DETECTED_STATE("MotionDetectedState"),
|
||||
OCCUPANCY_DETECTED_STATE("OccupancyDetectedState"),
|
||||
SMOKE_DETECTED_STATE("SmokeDetectedState"),
|
||||
|
||||
CARBON_MONOXIDE_DETECTED_STATE("CarbonMonoxideDetectedState"),
|
||||
CARBON_MONOXIDE_LEVEL("CarbonMonoxideLevel"),
|
||||
CARBON_MONOXIDE_PEAK_LEVEL("CarbonMonoxidePeakLevel"),
|
||||
|
||||
AIR_QUALITY("AirQuality"),
|
||||
BATTERY_CHARGING_STATE("BatteryChargingState"),
|
||||
BATTERY_LEVEL("BatteryLevel"),
|
||||
BATTERY_LOW_STATUS("BatteryLowStatus"),
|
||||
BRIGHTNESS("Brightness"),
|
||||
CARBON_DIOXIDE_DETECTED_STATE("CarbonDioxideDetectedState"),
|
||||
CARBON_DIOXIDE_LEVEL("CarbonDioxideLevel"),
|
||||
CARBON_DIOXIDE_PEAK_LEVEL("CarbonDioxidePeakLevel"),
|
||||
|
||||
RELATIVE_HUMIDITY("RelativeHumidity"),
|
||||
LEAK_DETECTED_STATE("LeakDetectedState"),
|
||||
HOLD_POSITION("HoldPosition"),
|
||||
|
||||
TARGET_POSITION("TargetPosition"),
|
||||
CURRENT_POSITION("CurrentPosition"),
|
||||
POSITION_STATE("PositionState"),
|
||||
CURRENT_HORIZONTAL_TILT_ANGLE("CurrentHorizontalTiltAngle"),
|
||||
CURRENT_VERTICAL_TILT_ANGLE("CurrentVerticalTiltAngle"),
|
||||
TARGET_HORIZONTAL_TILT_ANGLE("TargetHorizontalTiltAngle"),
|
||||
TARGET_VERTICAL_TILT_ANGLE("TargetVerticalTiltAngle"),
|
||||
CURRENT_TILT_ANGLE("CurrentTiltAngle"),
|
||||
TARGET_TILT_ANGLE("TargetTiltAngle"),
|
||||
|
||||
HUE("Hue"),
|
||||
BRIGHTNESS("Brightness"),
|
||||
SATURATION("Saturation"),
|
||||
CARBON_MONOXIDE_DETECTED_STATE("CarbonMonoxideDetectedState"),
|
||||
CARBON_MONOXIDE_LEVEL("CarbonMonoxideLevel"),
|
||||
CARBON_MONOXIDE_PEAK_LEVEL("CarbonMonoxidePeakLevel"),
|
||||
CLOSED_CAPTIONS("ClosedCaptions"),
|
||||
COLOR_TEMPERATURE("ColorTemperature"),
|
||||
|
||||
CURRENT_FAN_STATE("CurrentFanState"),
|
||||
TARGET_FAN_STATE("TargetFanState"),
|
||||
ROTATION_DIRECTION("RotationDirection"),
|
||||
ROTATION_SPEED("RotationSpeed"),
|
||||
SWING_MODE("SwingMode"),
|
||||
LOCK_CONTROL("LockControl"),
|
||||
|
||||
CURRENT_TEMPERATURE("CurrentTemperature"),
|
||||
TARGET_HEATING_COOLING_STATE("TargetHeatingCoolingMode"),
|
||||
CURRENT_HEATING_COOLING_STATE("CurrentHeatingCoolingMode"),
|
||||
TARGET_TEMPERATURE("TargetTemperature"),
|
||||
TEMPERATURE_UNIT("TemperatureUnit"),
|
||||
TARGET_RELATIVE_HUMIDITY("TargetRelativeHumidity"),
|
||||
|
||||
LOCK_CURRENT_STATE("LockCurrentState"),
|
||||
LOCK_TARGET_STATE("LockTargetState"),
|
||||
|
||||
DURATION("Duration"),
|
||||
REMAINING_DURATION("RemainingDuration"),
|
||||
|
||||
SECURITY_SYSTEM_CURRENT_STATE("CurrentSecuritySystemState"),
|
||||
SECURITY_SYSTEM_TARGET_STATE("TargetSecuritySystemState"),
|
||||
|
||||
VOLUME("Volume"),
|
||||
MUTE("Mute"),
|
||||
LIGHT_LEVEL("LightLevel"),
|
||||
|
||||
CURRENT_DOOR_STATE("CurrentDoorState"),
|
||||
TARGET_DOOR_STATE("TargetDoorState"),
|
||||
TARGET_HEATER_COOLER_STATE("TargetHeaterCoolerState"),
|
||||
CURRENT_HEATER_COOLER_STATE("CurrentHeaterCoolerState"),
|
||||
COOLING_THRESHOLD_TEMPERATURE("CoolingThresholdTemperature"),
|
||||
HEATING_THRESHOLD_TEMPERATURE("HeatingThresholdTemperature"),
|
||||
|
||||
AIR_QUALITY("AirQuality"),
|
||||
OZONE_DENSITY("OzoneDensity"),
|
||||
NITROGEN_DIOXIDE_DENSITY("NitrogenDioxideDensity"),
|
||||
SULPHUR_DIOXIDE_DENSITY("SulphurDioxideDensity"),
|
||||
PM25_DENSITY("PM25Density"),
|
||||
PM10_DENSITY("PM10Density"),
|
||||
VOC_DENSITY("VOCDensity"),
|
||||
|
||||
BATTERY_LEVEL("BatteryLevel"),
|
||||
BATTERY_CHARGING_STATE("BatteryChargingState"),
|
||||
|
||||
CURRENT_SLAT_STATE("CurrentSlatState"),
|
||||
|
||||
CURRENT_MEDIA_STATE("CurrentMediaState"),
|
||||
TARGET_MEDIA_STATE("TargetMediaState"),
|
||||
CONFIGURED("Configured"),
|
||||
CONFIGURED_NAME("ConfiguredName"),
|
||||
|
||||
ACTIVE("Active"),
|
||||
|
||||
CONTACT_SENSOR_STATE("ContactSensorState"),
|
||||
COOLING_THRESHOLD_TEMPERATURE("CoolingThresholdTemperature"),
|
||||
CURRENT_DOOR_STATE("CurrentDoorState"),
|
||||
CURRENT_FAN_STATE("CurrentFanState"),
|
||||
CURRENT_HEATER_COOLER_STATE("CurrentHeaterCoolerState"),
|
||||
CURRENT_HEATING_COOLING_STATE("CurrentHeatingCoolingMode"),
|
||||
CURRENT_HORIZONTAL_TILT_ANGLE("CurrentHorizontalTiltAngle"),
|
||||
CURRENT_MEDIA_STATE("CurrentMediaState"),
|
||||
CURRENT_POSITION("CurrentPosition"),
|
||||
CURRENT_SLAT_STATE("CurrentSlatState"),
|
||||
CURRENT_TEMPERATURE("CurrentTemperature"),
|
||||
CURRENT_TILT_ANGLE("CurrentTiltAngle"),
|
||||
CURRENT_VERTICAL_TILT_ANGLE("CurrentVerticalTiltAngle"),
|
||||
CURRENT_VISIBILITY("CurrentVisibility"),
|
||||
DURATION("Duration"),
|
||||
FAULT_STATUS("FaultStatus"),
|
||||
FILTER_CHANGE_INDICATION("FilterChangeIndication"),
|
||||
FILTER_LIFE_LEVEL("FilterLifeLevel"),
|
||||
FILTER_RESET_INDICATION("FilterResetIndication"),
|
||||
|
||||
ACTIVE_IDENTIFIER("ActiveIdentifier"),
|
||||
REMOTE_KEY("RemoteKey"),
|
||||
SLEEP_DISCOVERY_MODE("SleepDiscoveryMode"),
|
||||
POWER_MODE("PowerMode"),
|
||||
CLOSED_CAPTIONS("ClosedCaptions"),
|
||||
PICTURE_MODE("PictureMode"),
|
||||
|
||||
CONFIGURED("Configured"),
|
||||
INPUT_SOURCE_TYPE("InputSourceType"),
|
||||
CURRENT_VISIBILITY("CurrentVisibility"),
|
||||
FIRMWARE_REVISION("FirmwareRevision"),
|
||||
HARDWARE_REVISION("HardwareRevision"),
|
||||
HEATING_THRESHOLD_TEMPERATURE("HeatingThresholdTemperature"),
|
||||
HOLD_POSITION("HoldPosition"),
|
||||
HUE("Hue"),
|
||||
IDENTIFIER("Identifier"),
|
||||
IDENTIFY("Identify"),
|
||||
INPUT_DEVICE_TYPE("InputDeviceType"),
|
||||
TARGET_VISIBILITY_STATE("TargetVisibilityState"),
|
||||
|
||||
VOLUME_SELECTOR("VolumeSelector"),
|
||||
VOLUME_CONTROL_TYPE("VolumeControlType"),
|
||||
|
||||
INPUT_SOURCE_TYPE("InputSourceType"),
|
||||
INUSE_STATUS("InUseStatus"),
|
||||
ISCONFIGURED("IsConfigured"),
|
||||
LEAK_DETECTED_STATE("LeakDetectedState"),
|
||||
LIGHT_LEVEL("LightLevel"),
|
||||
LOCK_CONTROL("LockControl"),
|
||||
LOCK_CURRENT_STATE("LockCurrentState"),
|
||||
LOCK_TARGET_STATE("LockTargetState"),
|
||||
MANUFACTURER("Manufacturer"),
|
||||
MODEL("Model"),
|
||||
MOTION_DETECTED_STATE("MotionDetectedState"),
|
||||
MUTE("Mute"),
|
||||
NAME("Name"),
|
||||
NITROGEN_DIOXIDE_DENSITY("NitrogenDioxideDensity"),
|
||||
OBSTRUCTION_STATUS("ObstructionStatus"),
|
||||
OCCUPANCY_DETECTED_STATE("OccupancyDetectedState"),
|
||||
ON_STATE("OnState"),
|
||||
OZONE_DENSITY("OzoneDensity"),
|
||||
PICTURE_MODE("PictureMode"),
|
||||
PM10_DENSITY("PM10Density"),
|
||||
PM25_DENSITY("PM25Density"),
|
||||
POSITION_STATE("PositionState"),
|
||||
POWER_MODE("PowerMode"),
|
||||
PROGRAM_MODE("ProgramMode"),
|
||||
RELATIVE_HUMIDITY("RelativeHumidity"),
|
||||
REMAINING_DURATION("RemainingDuration"),
|
||||
REMOTE_KEY("RemoteKey"),
|
||||
ROTATION_DIRECTION("RotationDirection"),
|
||||
ROTATION_SPEED("RotationSpeed"),
|
||||
SATURATION("Saturation"),
|
||||
SECURITY_SYSTEM_CURRENT_STATE("CurrentSecuritySystemState"),
|
||||
SECURITY_SYSTEM_TARGET_STATE("TargetSecuritySystemState"),
|
||||
SERIAL_NUMBER("SerialNumber"),
|
||||
SERVICE_INDEX("ServiceIndex"),
|
||||
SERVICE_LABEL("ServiceLabel"),
|
||||
SERVICE_INDEX("ServiceIndex");
|
||||
SLEEP_DISCOVERY_MODE("SleepDiscoveryMode"),
|
||||
SMOKE_DETECTED_STATE("SmokeDetectedState"),
|
||||
SULPHUR_DIOXIDE_DENSITY("SulphurDioxideDensity"),
|
||||
SWING_MODE("SwingMode"),
|
||||
TAMPERED_STATUS("TamperedStatus"),
|
||||
TARGET_DOOR_STATE("TargetDoorState"),
|
||||
TARGET_FAN_STATE("TargetFanState"),
|
||||
TARGET_HEATER_COOLER_STATE("TargetHeaterCoolerState"),
|
||||
TARGET_HEATING_COOLING_STATE("TargetHeatingCoolingMode"),
|
||||
TARGET_HORIZONTAL_TILT_ANGLE("TargetHorizontalTiltAngle"),
|
||||
TARGET_MEDIA_STATE("TargetMediaState"),
|
||||
TARGET_POSITION("TargetPosition"),
|
||||
TARGET_RELATIVE_HUMIDITY("TargetRelativeHumidity"),
|
||||
TARGET_TEMPERATURE("TargetTemperature"),
|
||||
TARGET_TILT_ANGLE("TargetTiltAngle"),
|
||||
TARGET_VERTICAL_TILT_ANGLE("TargetVerticalTiltAngle"),
|
||||
TARGET_VISIBILITY_STATE("TargetVisibilityState"),
|
||||
TEMPERATURE_UNIT("TemperatureUnit"),
|
||||
VOC_DENSITY("VOCDensity"),
|
||||
VOLUME("Volume"),
|
||||
VOLUME_CONTROL_TYPE("VolumeControlType"),
|
||||
VOLUME_SELECTOR("VolumeSelector");
|
||||
|
||||
private static final Map<String, HomekitCharacteristicType> TAG_MAP = new HashMap<>();
|
||||
|
||||
|
@ -68,46 +68,47 @@ public class HomekitAccessoryFactory {
|
||||
private static final Map<HomekitAccessoryType, HomekitCharacteristicType[]> MANDATORY_CHARACTERISTICS = new HashMap<>() {
|
||||
{
|
||||
put(ACCESSORY_GROUP, new HomekitCharacteristicType[] {});
|
||||
put(LEAK_SENSOR, new HomekitCharacteristicType[] { LEAK_DETECTED_STATE });
|
||||
put(MOTION_SENSOR, new HomekitCharacteristicType[] { MOTION_DETECTED_STATE });
|
||||
put(OCCUPANCY_SENSOR, new HomekitCharacteristicType[] { OCCUPANCY_DETECTED_STATE });
|
||||
put(CONTACT_SENSOR, new HomekitCharacteristicType[] { CONTACT_SENSOR_STATE });
|
||||
put(SMOKE_SENSOR, new HomekitCharacteristicType[] { SMOKE_DETECTED_STATE });
|
||||
put(HUMIDITY_SENSOR, new HomekitCharacteristicType[] { RELATIVE_HUMIDITY });
|
||||
|
||||
put(AIR_QUALITY_SENSOR, new HomekitCharacteristicType[] { AIR_QUALITY });
|
||||
put(SWITCH, new HomekitCharacteristicType[] { ON_STATE });
|
||||
put(BASIC_FAN, new HomekitCharacteristicType[] { ON_STATE });
|
||||
put(BATTERY, new HomekitCharacteristicType[] { BATTERY_LEVEL, BATTERY_LOW_STATUS });
|
||||
put(CARBON_DIOXIDE_SENSOR, new HomekitCharacteristicType[] { CARBON_DIOXIDE_DETECTED_STATE });
|
||||
put(CARBON_MONOXIDE_SENSOR, new HomekitCharacteristicType[] { CARBON_MONOXIDE_DETECTED_STATE });
|
||||
put(WINDOW_COVERING, new HomekitCharacteristicType[] { TARGET_POSITION, CURRENT_POSITION, POSITION_STATE });
|
||||
put(LIGHTBULB, new HomekitCharacteristicType[] { ON_STATE });
|
||||
put(BASIC_FAN, new HomekitCharacteristicType[] { ON_STATE });
|
||||
put(CONTACT_SENSOR, new HomekitCharacteristicType[] { CONTACT_SENSOR_STATE });
|
||||
put(DOOR, new HomekitCharacteristicType[] { CURRENT_POSITION, TARGET_POSITION, POSITION_STATE });
|
||||
put(FAN, new HomekitCharacteristicType[] { ACTIVE_STATUS });
|
||||
put(LIGHT_SENSOR, new HomekitCharacteristicType[] { LIGHT_LEVEL });
|
||||
put(TEMPERATURE_SENSOR, new HomekitCharacteristicType[] { CURRENT_TEMPERATURE });
|
||||
put(THERMOSTAT, new HomekitCharacteristicType[] { CURRENT_HEATING_COOLING_STATE,
|
||||
TARGET_HEATING_COOLING_STATE, CURRENT_TEMPERATURE });
|
||||
put(LOCK, new HomekitCharacteristicType[] { LOCK_CURRENT_STATE, LOCK_TARGET_STATE });
|
||||
put(VALVE, new HomekitCharacteristicType[] { ACTIVE_STATUS, INUSE_STATUS });
|
||||
put(SECURITY_SYSTEM,
|
||||
new HomekitCharacteristicType[] { SECURITY_SYSTEM_CURRENT_STATE, SECURITY_SYSTEM_TARGET_STATE });
|
||||
put(OUTLET, new HomekitCharacteristicType[] { ON_STATE, INUSE_STATUS });
|
||||
put(SPEAKER, new HomekitCharacteristicType[] { MUTE });
|
||||
put(SMART_SPEAKER, new HomekitCharacteristicType[] { CURRENT_MEDIA_STATE, TARGET_MEDIA_STATE });
|
||||
put(FAUCET, new HomekitCharacteristicType[] { ACTIVE_STATUS });
|
||||
put(FILTER_MAINTENANCE, new HomekitCharacteristicType[] { FILTER_CHANGE_INDICATION });
|
||||
put(GARAGE_DOOR_OPENER,
|
||||
new HomekitCharacteristicType[] { CURRENT_DOOR_STATE, TARGET_DOOR_STATE, OBSTRUCTION_STATUS });
|
||||
put(HEATER_COOLER, new HomekitCharacteristicType[] { ACTIVE_STATUS, CURRENT_HEATER_COOLER_STATE,
|
||||
TARGET_HEATER_COOLER_STATE, CURRENT_TEMPERATURE });
|
||||
put(WINDOW, new HomekitCharacteristicType[] { CURRENT_POSITION, TARGET_POSITION, POSITION_STATE });
|
||||
put(DOOR, new HomekitCharacteristicType[] { CURRENT_POSITION, TARGET_POSITION, POSITION_STATE });
|
||||
put(BATTERY, new HomekitCharacteristicType[] { BATTERY_LEVEL, BATTERY_LOW_STATUS });
|
||||
put(FILTER_MAINTENANCE, new HomekitCharacteristicType[] { FILTER_CHANGE_INDICATION });
|
||||
put(SLAT, new HomekitCharacteristicType[] { CURRENT_SLAT_STATE });
|
||||
put(FAUCET, new HomekitCharacteristicType[] { ACTIVE_STATUS });
|
||||
put(MICROPHONE, new HomekitCharacteristicType[] { MUTE });
|
||||
put(TELEVISION, new HomekitCharacteristicType[] { ACTIVE });
|
||||
put(HUMIDITY_SENSOR, new HomekitCharacteristicType[] { RELATIVE_HUMIDITY });
|
||||
put(INPUT_SOURCE, new HomekitCharacteristicType[] {});
|
||||
put(TELEVISION_SPEAKER, new HomekitCharacteristicType[] { MUTE });
|
||||
put(IRRIGATION_SYSTEM, new HomekitCharacteristicType[] { ACTIVE, INUSE_STATUS, PROGRAM_MODE });
|
||||
put(LEAK_SENSOR, new HomekitCharacteristicType[] { LEAK_DETECTED_STATE });
|
||||
put(LIGHT_SENSOR, new HomekitCharacteristicType[] { LIGHT_LEVEL });
|
||||
put(LIGHTBULB, new HomekitCharacteristicType[] { ON_STATE });
|
||||
put(LOCK, new HomekitCharacteristicType[] { LOCK_CURRENT_STATE, LOCK_TARGET_STATE });
|
||||
put(MICROPHONE, new HomekitCharacteristicType[] { MUTE });
|
||||
put(MOTION_SENSOR, new HomekitCharacteristicType[] { MOTION_DETECTED_STATE });
|
||||
put(OCCUPANCY_SENSOR, new HomekitCharacteristicType[] { OCCUPANCY_DETECTED_STATE });
|
||||
put(OUTLET, new HomekitCharacteristicType[] { ON_STATE, INUSE_STATUS });
|
||||
put(SECURITY_SYSTEM,
|
||||
new HomekitCharacteristicType[] { SECURITY_SYSTEM_CURRENT_STATE, SECURITY_SYSTEM_TARGET_STATE });
|
||||
put(SMART_SPEAKER, new HomekitCharacteristicType[] { CURRENT_MEDIA_STATE, TARGET_MEDIA_STATE });
|
||||
put(SMOKE_SENSOR, new HomekitCharacteristicType[] { SMOKE_DETECTED_STATE });
|
||||
put(SLAT, new HomekitCharacteristicType[] { CURRENT_SLAT_STATE });
|
||||
put(SPEAKER, new HomekitCharacteristicType[] { MUTE });
|
||||
put(SWITCH, new HomekitCharacteristicType[] { ON_STATE });
|
||||
put(TELEVISION, new HomekitCharacteristicType[] { ACTIVE });
|
||||
put(TELEVISION_SPEAKER, new HomekitCharacteristicType[] { MUTE });
|
||||
put(TEMPERATURE_SENSOR, new HomekitCharacteristicType[] { CURRENT_TEMPERATURE });
|
||||
put(THERMOSTAT, new HomekitCharacteristicType[] { CURRENT_HEATING_COOLING_STATE,
|
||||
TARGET_HEATING_COOLING_STATE, CURRENT_TEMPERATURE });
|
||||
put(VALVE, new HomekitCharacteristicType[] { ACTIVE_STATUS, INUSE_STATUS });
|
||||
put(WINDOW, new HomekitCharacteristicType[] { CURRENT_POSITION, TARGET_POSITION, POSITION_STATE });
|
||||
put(WINDOW_COVERING, new HomekitCharacteristicType[] { TARGET_POSITION, CURRENT_POSITION, POSITION_STATE });
|
||||
}
|
||||
};
|
||||
|
||||
@ -115,42 +116,43 @@ public class HomekitAccessoryFactory {
|
||||
private static final Map<HomekitAccessoryType, Class<? extends AbstractHomekitAccessoryImpl>> SERVICE_IMPL_MAP = new HashMap<>() {
|
||||
{
|
||||
put(ACCESSORY_GROUP, HomekitAccessoryGroupImpl.class);
|
||||
put(LEAK_SENSOR, HomekitLeakSensorImpl.class);
|
||||
put(MOTION_SENSOR, HomekitMotionSensorImpl.class);
|
||||
put(OCCUPANCY_SENSOR, HomekitOccupancySensorImpl.class);
|
||||
put(CONTACT_SENSOR, HomekitContactSensorImpl.class);
|
||||
put(SMOKE_SENSOR, HomekitSmokeSensorImpl.class);
|
||||
put(HUMIDITY_SENSOR, HomekitHumiditySensorImpl.class);
|
||||
|
||||
put(AIR_QUALITY_SENSOR, HomekitAirQualitySensorImpl.class);
|
||||
put(SWITCH, HomekitSwitchImpl.class);
|
||||
put(BASIC_FAN, HomekitBasicFanImpl.class);
|
||||
put(BATTERY, HomekitBatteryImpl.class);
|
||||
put(CARBON_DIOXIDE_SENSOR, HomekitCarbonDioxideSensorImpl.class);
|
||||
put(CARBON_MONOXIDE_SENSOR, HomekitCarbonMonoxideSensorImpl.class);
|
||||
put(WINDOW_COVERING, HomekitWindowCoveringImpl.class);
|
||||
put(LIGHTBULB, HomekitLightbulbImpl.class);
|
||||
put(BASIC_FAN, HomekitBasicFanImpl.class);
|
||||
put(CONTACT_SENSOR, HomekitContactSensorImpl.class);
|
||||
put(DOOR, HomekitDoorImpl.class);
|
||||
put(FAN, HomekitFanImpl.class);
|
||||
put(FAUCET, HomekitFaucetImpl.class);
|
||||
put(FILTER_MAINTENANCE, HomekitFilterMaintenanceImpl.class);
|
||||
put(GARAGE_DOOR_OPENER, HomekitGarageDoorOpenerImpl.class);
|
||||
put(HEATER_COOLER, HomekitHeaterCoolerImpl.class);
|
||||
put(HUMIDITY_SENSOR, HomekitHumiditySensorImpl.class);
|
||||
put(INPUT_SOURCE, HomekitInputSourceImpl.class);
|
||||
put(IRRIGATION_SYSTEM, HomekitIrrigationSystemImpl.class);
|
||||
put(LEAK_SENSOR, HomekitLeakSensorImpl.class);
|
||||
put(LIGHT_SENSOR, HomekitLightSensorImpl.class);
|
||||
put(LIGHTBULB, HomekitLightbulbImpl.class);
|
||||
put(LOCK, HomekitLockImpl.class);
|
||||
put(MICROPHONE, HomekitMicrophoneImpl.class);
|
||||
put(MOTION_SENSOR, HomekitMotionSensorImpl.class);
|
||||
put(OCCUPANCY_SENSOR, HomekitOccupancySensorImpl.class);
|
||||
put(OUTLET, HomekitOutletImpl.class);
|
||||
put(SECURITY_SYSTEM, HomekitSecuritySystemImpl.class);
|
||||
put(SLAT, HomekitSlatImpl.class);
|
||||
put(SMART_SPEAKER, HomekitSmartSpeakerImpl.class);
|
||||
put(SMOKE_SENSOR, HomekitSmokeSensorImpl.class);
|
||||
put(SPEAKER, HomekitSpeakerImpl.class);
|
||||
put(SWITCH, HomekitSwitchImpl.class);
|
||||
put(TELEVISION, HomekitTelevisionImpl.class);
|
||||
put(TELEVISION_SPEAKER, HomekitTelevisionSpeakerImpl.class);
|
||||
put(TEMPERATURE_SENSOR, HomekitTemperatureSensorImpl.class);
|
||||
put(THERMOSTAT, HomekitThermostatImpl.class);
|
||||
put(LOCK, HomekitLockImpl.class);
|
||||
put(VALVE, HomekitValveImpl.class);
|
||||
put(SECURITY_SYSTEM, HomekitSecuritySystemImpl.class);
|
||||
put(OUTLET, HomekitOutletImpl.class);
|
||||
put(SPEAKER, HomekitSpeakerImpl.class);
|
||||
put(SMART_SPEAKER, HomekitSmartSpeakerImpl.class);
|
||||
put(GARAGE_DOOR_OPENER, HomekitGarageDoorOpenerImpl.class);
|
||||
put(DOOR, HomekitDoorImpl.class);
|
||||
put(WINDOW, HomekitWindowImpl.class);
|
||||
put(HEATER_COOLER, HomekitHeaterCoolerImpl.class);
|
||||
put(BATTERY, HomekitBatteryImpl.class);
|
||||
put(FILTER_MAINTENANCE, HomekitFilterMaintenanceImpl.class);
|
||||
put(SLAT, HomekitSlatImpl.class);
|
||||
put(FAUCET, HomekitFaucetImpl.class);
|
||||
put(MICROPHONE, HomekitMicrophoneImpl.class);
|
||||
put(TELEVISION, HomekitTelevisionImpl.class);
|
||||
put(INPUT_SOURCE, HomekitInputSourceImpl.class);
|
||||
put(TELEVISION_SPEAKER, HomekitTelevisionSpeakerImpl.class);
|
||||
put(IRRIGATION_SYSTEM, HomekitIrrigationSystemImpl.class);
|
||||
put(WINDOW_COVERING, HomekitWindowCoveringImpl.class);
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user