mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +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
|
* @author Andy Lintner - Initial contribution
|
||||||
*/
|
*/
|
||||||
public enum HomekitAccessoryType {
|
public enum HomekitAccessoryType {
|
||||||
HUMIDITY_SENSOR("HumiditySensor"),
|
ACCESSORY_GROUP("AccessoryGroup"),
|
||||||
LIGHTBULB("Lighting"),
|
DUMMY("Dummy"),
|
||||||
SWITCH("Switchable"),
|
|
||||||
TEMPERATURE_SENSOR("TemperatureSensor"),
|
AIR_QUALITY_SENSOR("AirQualitySensor"),
|
||||||
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"),
|
|
||||||
BASIC_FAN("BasicFan"),
|
BASIC_FAN("BasicFan"),
|
||||||
|
BATTERY("Battery"),
|
||||||
|
CARBON_DIOXIDE_SENSOR("CarbonDioxideSensor"),
|
||||||
|
CARBON_MONOXIDE_SENSOR("CarbonMonoxideSensor"),
|
||||||
|
CONTACT_SENSOR("ContactSensor"),
|
||||||
|
DOOR("Door"),
|
||||||
FAN("Fan"),
|
FAN("Fan"),
|
||||||
LOCK("Lock"),
|
FAUCET("Faucet"),
|
||||||
SECURITY_SYSTEM("SecuritySystem"),
|
FILTER_MAINTENANCE("Filter"),
|
||||||
OUTLET("Outlet"),
|
|
||||||
SPEAKER("Speaker"),
|
|
||||||
SMART_SPEAKER("SmartSpeaker"),
|
|
||||||
GARAGE_DOOR_OPENER("GarageDoorOpener"),
|
GARAGE_DOOR_OPENER("GarageDoorOpener"),
|
||||||
HEATER_COOLER("HeaterCooler"),
|
HEATER_COOLER("HeaterCooler"),
|
||||||
LIGHT_SENSOR("LightSensor"),
|
HUMIDITY_SENSOR("HumiditySensor"),
|
||||||
AIR_QUALITY_SENSOR("AirQualitySensor"),
|
|
||||||
BATTERY("Battery"),
|
|
||||||
FILTER_MAINTENANCE("Filter"),
|
|
||||||
FAUCET("Faucet"),
|
|
||||||
MICROPHONE("Microphone"),
|
|
||||||
SLAT("Slat"),
|
|
||||||
TELEVISION("Television"),
|
|
||||||
INPUT_SOURCE("InputSource"),
|
INPUT_SOURCE("InputSource"),
|
||||||
TELEVISION_SPEAKER("TelevisionSpeaker"),
|
|
||||||
ACCESSORY_GROUP("AccessoryGroup"),
|
|
||||||
IRRIGATION_SYSTEM("IrrigationSystem"),
|
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<>();
|
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
|
EMPTY("Empty"), // used in case only accessory type but no characteristic provided
|
||||||
|
|
||||||
NAME("Name"),
|
ACTIVE("Active"),
|
||||||
MANUFACTURER("Manufacturer"),
|
ACTIVE_IDENTIFIER("ActiveIdentifier"),
|
||||||
MODEL("Model"),
|
|
||||||
SERIAL_NUMBER("SerialNumber"),
|
|
||||||
FIRMWARE_REVISION("FirmwareRevision"),
|
|
||||||
HARDWARE_REVISION("HardwareRevision"),
|
|
||||||
IDENTIFY("Identify"),
|
|
||||||
|
|
||||||
BATTERY_LOW_STATUS("BatteryLowStatus"),
|
|
||||||
ACTIVE_STATUS("ActiveStatus"),
|
ACTIVE_STATUS("ActiveStatus"),
|
||||||
ISCONFIGURED("IsConfigured"),
|
AIR_QUALITY("AirQuality"),
|
||||||
SERVICELABELIDX("ServiceLabelIndex"),
|
BATTERY_CHARGING_STATE("BatteryChargingState"),
|
||||||
INUSE_STATUS("InUseStatus"),
|
BATTERY_LEVEL("BatteryLevel"),
|
||||||
FAULT_STATUS("FaultStatus"),
|
BATTERY_LOW_STATUS("BatteryLowStatus"),
|
||||||
TAMPERED_STATUS("TamperedStatus"),
|
BRIGHTNESS("Brightness"),
|
||||||
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"),
|
|
||||||
|
|
||||||
CARBON_DIOXIDE_DETECTED_STATE("CarbonDioxideDetectedState"),
|
CARBON_DIOXIDE_DETECTED_STATE("CarbonDioxideDetectedState"),
|
||||||
CARBON_DIOXIDE_LEVEL("CarbonDioxideLevel"),
|
CARBON_DIOXIDE_LEVEL("CarbonDioxideLevel"),
|
||||||
CARBON_DIOXIDE_PEAK_LEVEL("CarbonDioxidePeakLevel"),
|
CARBON_DIOXIDE_PEAK_LEVEL("CarbonDioxidePeakLevel"),
|
||||||
|
CARBON_MONOXIDE_DETECTED_STATE("CarbonMonoxideDetectedState"),
|
||||||
RELATIVE_HUMIDITY("RelativeHumidity"),
|
CARBON_MONOXIDE_LEVEL("CarbonMonoxideLevel"),
|
||||||
LEAK_DETECTED_STATE("LeakDetectedState"),
|
CARBON_MONOXIDE_PEAK_LEVEL("CarbonMonoxidePeakLevel"),
|
||||||
HOLD_POSITION("HoldPosition"),
|
CLOSED_CAPTIONS("ClosedCaptions"),
|
||||||
|
|
||||||
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"),
|
|
||||||
COLOR_TEMPERATURE("ColorTemperature"),
|
COLOR_TEMPERATURE("ColorTemperature"),
|
||||||
|
CONFIGURED("Configured"),
|
||||||
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_NAME("ConfiguredName"),
|
CONFIGURED_NAME("ConfiguredName"),
|
||||||
|
CONTACT_SENSOR_STATE("ContactSensorState"),
|
||||||
ACTIVE("Active"),
|
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_CHANGE_INDICATION("FilterChangeIndication"),
|
||||||
FILTER_LIFE_LEVEL("FilterLifeLevel"),
|
FILTER_LIFE_LEVEL("FilterLifeLevel"),
|
||||||
FILTER_RESET_INDICATION("FilterResetIndication"),
|
FILTER_RESET_INDICATION("FilterResetIndication"),
|
||||||
|
FIRMWARE_REVISION("FirmwareRevision"),
|
||||||
ACTIVE_IDENTIFIER("ActiveIdentifier"),
|
HARDWARE_REVISION("HardwareRevision"),
|
||||||
REMOTE_KEY("RemoteKey"),
|
HEATING_THRESHOLD_TEMPERATURE("HeatingThresholdTemperature"),
|
||||||
SLEEP_DISCOVERY_MODE("SleepDiscoveryMode"),
|
HOLD_POSITION("HoldPosition"),
|
||||||
POWER_MODE("PowerMode"),
|
HUE("Hue"),
|
||||||
CLOSED_CAPTIONS("ClosedCaptions"),
|
|
||||||
PICTURE_MODE("PictureMode"),
|
|
||||||
|
|
||||||
CONFIGURED("Configured"),
|
|
||||||
INPUT_SOURCE_TYPE("InputSourceType"),
|
|
||||||
CURRENT_VISIBILITY("CurrentVisibility"),
|
|
||||||
IDENTIFIER("Identifier"),
|
IDENTIFIER("Identifier"),
|
||||||
|
IDENTIFY("Identify"),
|
||||||
INPUT_DEVICE_TYPE("InputDeviceType"),
|
INPUT_DEVICE_TYPE("InputDeviceType"),
|
||||||
TARGET_VISIBILITY_STATE("TargetVisibilityState"),
|
INPUT_SOURCE_TYPE("InputSourceType"),
|
||||||
|
INUSE_STATUS("InUseStatus"),
|
||||||
VOLUME_SELECTOR("VolumeSelector"),
|
ISCONFIGURED("IsConfigured"),
|
||||||
VOLUME_CONTROL_TYPE("VolumeControlType"),
|
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"),
|
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_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<>();
|
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<>() {
|
private static final Map<HomekitAccessoryType, HomekitCharacteristicType[]> MANDATORY_CHARACTERISTICS = new HashMap<>() {
|
||||||
{
|
{
|
||||||
put(ACCESSORY_GROUP, new HomekitCharacteristicType[] {});
|
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(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_DIOXIDE_SENSOR, new HomekitCharacteristicType[] { CARBON_DIOXIDE_DETECTED_STATE });
|
||||||
put(CARBON_MONOXIDE_SENSOR, new HomekitCharacteristicType[] { CARBON_MONOXIDE_DETECTED_STATE });
|
put(CARBON_MONOXIDE_SENSOR, new HomekitCharacteristicType[] { CARBON_MONOXIDE_DETECTED_STATE });
|
||||||
put(WINDOW_COVERING, new HomekitCharacteristicType[] { TARGET_POSITION, CURRENT_POSITION, POSITION_STATE });
|
put(CONTACT_SENSOR, new HomekitCharacteristicType[] { CONTACT_SENSOR_STATE });
|
||||||
put(LIGHTBULB, new HomekitCharacteristicType[] { ON_STATE });
|
put(DOOR, new HomekitCharacteristicType[] { CURRENT_POSITION, TARGET_POSITION, POSITION_STATE });
|
||||||
put(BASIC_FAN, new HomekitCharacteristicType[] { ON_STATE });
|
|
||||||
put(FAN, new HomekitCharacteristicType[] { ACTIVE_STATUS });
|
put(FAN, new HomekitCharacteristicType[] { ACTIVE_STATUS });
|
||||||
put(LIGHT_SENSOR, new HomekitCharacteristicType[] { LIGHT_LEVEL });
|
put(FAUCET, new HomekitCharacteristicType[] { ACTIVE_STATUS });
|
||||||
put(TEMPERATURE_SENSOR, new HomekitCharacteristicType[] { CURRENT_TEMPERATURE });
|
put(FILTER_MAINTENANCE, new HomekitCharacteristicType[] { FILTER_CHANGE_INDICATION });
|
||||||
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(GARAGE_DOOR_OPENER,
|
put(GARAGE_DOOR_OPENER,
|
||||||
new HomekitCharacteristicType[] { CURRENT_DOOR_STATE, TARGET_DOOR_STATE, OBSTRUCTION_STATUS });
|
new HomekitCharacteristicType[] { CURRENT_DOOR_STATE, TARGET_DOOR_STATE, OBSTRUCTION_STATUS });
|
||||||
put(HEATER_COOLER, new HomekitCharacteristicType[] { ACTIVE_STATUS, CURRENT_HEATER_COOLER_STATE,
|
put(HEATER_COOLER, new HomekitCharacteristicType[] { ACTIVE_STATUS, CURRENT_HEATER_COOLER_STATE,
|
||||||
TARGET_HEATER_COOLER_STATE, CURRENT_TEMPERATURE });
|
TARGET_HEATER_COOLER_STATE, CURRENT_TEMPERATURE });
|
||||||
put(WINDOW, new HomekitCharacteristicType[] { CURRENT_POSITION, TARGET_POSITION, POSITION_STATE });
|
put(HUMIDITY_SENSOR, new HomekitCharacteristicType[] { RELATIVE_HUMIDITY });
|
||||||
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(INPUT_SOURCE, new HomekitCharacteristicType[] {});
|
put(INPUT_SOURCE, new HomekitCharacteristicType[] {});
|
||||||
put(TELEVISION_SPEAKER, new HomekitCharacteristicType[] { MUTE });
|
|
||||||
put(IRRIGATION_SYSTEM, new HomekitCharacteristicType[] { ACTIVE, INUSE_STATUS, PROGRAM_MODE });
|
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<>() {
|
private static final Map<HomekitAccessoryType, Class<? extends AbstractHomekitAccessoryImpl>> SERVICE_IMPL_MAP = new HashMap<>() {
|
||||||
{
|
{
|
||||||
put(ACCESSORY_GROUP, HomekitAccessoryGroupImpl.class);
|
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(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_DIOXIDE_SENSOR, HomekitCarbonDioxideSensorImpl.class);
|
||||||
put(CARBON_MONOXIDE_SENSOR, HomekitCarbonMonoxideSensorImpl.class);
|
put(CARBON_MONOXIDE_SENSOR, HomekitCarbonMonoxideSensorImpl.class);
|
||||||
put(WINDOW_COVERING, HomekitWindowCoveringImpl.class);
|
put(CONTACT_SENSOR, HomekitContactSensorImpl.class);
|
||||||
put(LIGHTBULB, HomekitLightbulbImpl.class);
|
put(DOOR, HomekitDoorImpl.class);
|
||||||
put(BASIC_FAN, HomekitBasicFanImpl.class);
|
|
||||||
put(FAN, HomekitFanImpl.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(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(TEMPERATURE_SENSOR, HomekitTemperatureSensorImpl.class);
|
||||||
put(THERMOSTAT, HomekitThermostatImpl.class);
|
put(THERMOSTAT, HomekitThermostatImpl.class);
|
||||||
put(LOCK, HomekitLockImpl.class);
|
|
||||||
put(VALVE, HomekitValveImpl.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(WINDOW, HomekitWindowImpl.class);
|
||||||
put(HEATER_COOLER, HomekitHeaterCoolerImpl.class);
|
put(WINDOW_COVERING, HomekitWindowCoveringImpl.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);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user