HomeDevice class abstract

Base class for home devices

Contains the shared functionality for all appliances.

Implementers

Constructors

HomeDevice(HomeConnectApi api, DeviceInfo info, List<DeviceStatus> status, List<DeviceProgram> programs, List<DeviceSetting> settings)

Properties

api HomeConnectApi
final
deviceHaId String
no setter
deviceName String
no setter
hashCode int
The hash code for this object.
no setterinherited
info DeviceInfo
final
programs List<DeviceProgram>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedProgram DeviceProgram?
getter/setter pair
settings List<DeviceSetting>
getter/setter pair
status List<DeviceStatus>
getter/setter pair

Methods

addStatus(DeviceStatus stat) → dynamic
getPrograms() Future<List<DeviceProgram>>
Gets the list of programs available for the selected home appliance
getSelectedProgram() Future<DeviceProgram>
getSelectedProgramOptions() Future<List<ProgramOptions>>
getSettings() Future<List<DeviceSetting>>
getStatus() Future<List<DeviceStatus>>
init() Future<HomeDevice>
Initializes the device
isDeviceReady() bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
selectProgram({required String programKey}) Future<void>
Selects a program to run on the selected home appliance programKey - the key of the program to select Trhows generic exception if the request fails.
startListening() Future<void>
Starts listening for events from the selected home appliance
startProgram({String? programKey, List<ProgramOptions> options = const []}) Future<void>
Starts the selected program
stopListening() Future<void>
Stops listening for events from the selected home appliance
stopProgram() Future<void>
Stops the currently running program
toString() String
A string representation of this object.
inherited
turnOff() → void
Turns off the selected home appliance
turnOn() → void
Turns on the selected home appliance
updateSettingsFromEvent({required List<DeviceEvent> eventData}) → void
updateStatusFromEvent({required List<DeviceEvent> eventData}) → void

Operators

operator ==(Object other) bool
The equality operator.
inherited