Device class
Third-party device definition.
Constructors
-
Device({Map<
String, Object?> ? attributes, Map<String, Object?> ? customData, DeviceInfo? deviceInfo, String? id, DeviceNames? name, bool? notificationSupportedByAgent, List<AgentOtherDeviceId> ? otherDeviceIds, String? roomHint, String? structureHint, List<String> ? traits, String? type, bool? willReportState}) - Device.fromJson(Map json_)
Properties
-
attributes
↔ Map<
String, Object?> ? -
Attributes for the traits supported by the device.
getter/setter pair
-
customData
↔ Map<
String, Object?> ? -
Custom device attributes stored in Home Graph and provided to your smart
home Action in each
QUERY
and
EXECUTE
intent.
getter/setter pair
- deviceInfo ↔ DeviceInfo?
-
Device manufacturer, model, hardware version, and software version.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String?
-
Third-party device ID.
getter/setter pair
- name ↔ DeviceNames?
-
Names given to this device by your smart home Action.
getter/setter pair
- notificationSupportedByAgent ↔ bool?
-
Indicates whether your smart home Action will report notifications to
Google for this device via ReportStateAndNotification.
getter/setter pair
-
otherDeviceIds
↔ List<
AgentOtherDeviceId> ? -
Alternate IDs associated with this device.
getter/setter pair
- roomHint ↔ String?
-
Suggested name for the room where this device is installed.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- structureHint ↔ String?
-
Suggested name for the structure where this device is installed.
getter/setter pair
-
traits
↔ List<
String> ? -
Traits supported by the device.
getter/setter pair
- type ↔ String?
-
Hardware type of the device.
getter/setter pair
- willReportState ↔ bool?
-
Indicates whether your smart home Action will report state of this device
to Google via ReportStateAndNotification.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited