Package wtf.choco.dyson4j.setting
Class FanState<T extends MqttStateValueProvider>
java.lang.Object
wtf.choco.dyson4j.setting.FanState<T>
- Type Parameters:
T
- the state value type
Represents a state that a Dyson fan possesses.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FanState<AirQualityTarget>
The target air quality the fan will attempt to achieve with its filter.The type of air distribution focus.Heater mode.static final FanState<TemperatureLimit>
The maximum temperature (in Kelvin) that the fan will attempt to achieve in heat mode.The mode of the fan.static final FanState<AirQualityMonitor>
Whether or not the fan will passively monitor air quality.Night mode (not to be confused withMODE
).static final FanState<FanOscillation>
Whether or not the fan is oscillating.static final FanState<ResetFilterState>
Whether or not the fan requires a filter change.static final FanState<SleepTimer>
The sleep timer (in minutes).The speed of the fan. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends MqttStateValueProvider>
@Nullable FanState<T>Get aFanState
by its internal MQTT id.getId()
Get the unique id of this fan state (used in MQTT communications).getName()
Get the friendly name of this fan state, useful for display.Get theClass
of the value required by this state.
-
Field Details
-
MODE
The mode of the fan.- See Also:
-
SPEED
The speed of the fan.- See Also:
-
OSCILLATION
Whether or not the fan is oscillating.- See Also:
-
SLEEP_TIMER
The sleep timer (in minutes).- See Also:
-
MONITOR_AIR_QUALITY
Whether or not the fan will passively monitor air quality.- See Also:
-
RESET_FILTER_STATE
Whether or not the fan requires a filter change.If this state is set to
ResetFilterState.RESET
, the fan will reset the lifetime of its filter as though it has been changed.- See Also:
-
AIR_QUALITY_TARGET
The target air quality the fan will attempt to achieve with its filter.- See Also:
-
NIGHT_MODE
Night mode (not to be confused withMODE
).- See Also:
-
HEAT_MODE
Heater mode.- See Also:
-
FOCUS_MODE
The type of air distribution focus.- See Also:
-
MAXIMUM_TEMPERATURE
The maximum temperature (in Kelvin) that the fan will attempt to achieve in heat mode.- See Also:
-
-
Method Details
-
getId
Get the unique id of this fan state (used in MQTT communications).- Returns:
- the unique id
-
getName
Get the friendly name of this fan state, useful for display.- Returns:
- the name
-
getValueType
Get theClass
of the value required by this state.- Returns:
- the value class
-
getById
@Nullable public static <T extends MqttStateValueProvider> @Nullable FanState<T> getById(@NotNull @NotNull String id) Get aFanState
by its internal MQTT id.- Type Parameters:
T
- a generic MqttStateValueProvider type- Parameters:
id
- the internal MQTT id of the fan state- Returns:
- the fan state, or null if none exists with the given id
-