Instance Method

initWithEnableFan:enableAirConditioner:enableClimateControl:enableAutoMode:airCirculationMode:fanSpeedIndex:fanSpeedPercentage:relativeFanSpeedSetting:temperature:relativeTemperatureSetting:climateZone:carName:

Initializes the intent object with the specified climate settings information.

Declaration

- (instancetype)initWithEnableFan:(NSNumber *)enableFan enableAirConditioner:(NSNumber *)enableAirConditioner enableClimateControl:(NSNumber *)enableClimateControl enableAutoMode:(NSNumber *)enableAutoMode airCirculationMode:(INCarAirCirculationMode)airCirculationMode fanSpeedIndex:(NSNumber *)fanSpeedIndex fanSpeedPercentage:(NSNumber *)fanSpeedPercentage relativeFanSpeedSetting:(INRelativeSetting)relativeFanSpeedSetting temperature:(NSMeasurement<NSUnitTemperature *> *)temperature relativeTemperatureSetting:(INRelativeSetting)relativeTemperatureSetting climateZone:(INCarSeat)climateZone carName:(INSpeakableString *)carName;

Parameters

enableFan

A Boolean value indicating whether to turn on the cabin fan system. Specify nil if you do not want to modify this setting.

enableAirConditioner

A Boolean value indicating whether to turn on the air conditioner system. Specify nil if you do not want to modify this setting.

enableClimateControl

A Boolean value indicating whether to turn on the climate control system. Specify nil if you do not want to modify this setting.

enableAutoMode

A Boolean value indicating whether to turn on automatic mode for the climate control system. Specify nil if you do not want to modify this setting.

airCirculationMode

The air circulation mode to apply. Specify INCarAirCirculationModeUnknown if you do not want to modify this setting.

fanSpeedIndex

The fan speed, specified as an integer indicating the position of the corresponding controls. Specify nil if you do not want to modify this setting.

fanSpeedPercentage

The fan speed, specified as a percentage of the maximum fan speed. Specify nil if you do not want to modify this setting.

relativeFanSpeedSetting

The fan speed, specified as a change relative to the current fan speed. Specify INRelativeSettingUnknown if you do not want to modify this setting.

temperature

The desired temperature, specified as a specific number of degrees. Specify nil if you do not want to modify this setting.

relativeTemperatureSetting

The desired temperature, specified as a change relative to the current temperature. Specify INRelativeSettingUnknown if you do not want to modify this setting.

climateZone

The climate zone whose settings are to be modified. Specify INCarSeatUnknown if you do not want to modify this setting.

carName

The name of the car to apply the settings to.

Return Value

An initialized intent object or nil if the object could not be created.

Discussion

Normally, you do not create instances of this class yourself. Instead, Siri creates instances when the user asks to change the vehicle’s climate control settings. However, you can use this method during testing to create intent objects in order to validate your intent handling code paths. Your test code should modify the settings for only one system at a time.