Sensor class abstract

Constructors

Sensor([dynamic updates(SensorBuilder b)])
factory
Sensor.fromJson(Map json, {int? id})
factory

Properties

battery int?
The current battery state in percent, only for battery powered devices. Not present when not provided on creation (CLIP sensors).
no setter
config SensorConfig?
no setter
hashCode int
The hash code for this object.
no setterinherited
id int?
no setter
manufacturerName String?
The name of the device manufacturer.
no setter
model SensorModel?
no setter
modelId String?
This parameter uniquely identifies the hardware model of the device for the given manufaturer.
no setter
name String?
The human readable name of the sensor, can be changed by the user
no setter
on bool?
Turns the sensor on/off. When off, state changes of the sensor are not reflected in the sensor resource. Default is "true"
no setter
reachable bool?
Indicates whether communication with devices is possible. CLIP Sensors do not yet support reachable verification.Mandatory for all Sensors except ZGPSwitch, Daylight
no setter
recycle bool?
When true: Resource is automatically deleted when not referenced anymore in any resource link. Only for CLIP sensors on creation of resource. “false” when omitted.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state SensorState?
no setter
swVersion String?
This parameter uniquely identifies the software version running in the hardware.
no setter
type String?
Type name of the sensor
no setter
uniqueId String?
Unique id of the sensor. Should be the MAC address of the device.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rebuild(dynamic updates(SensorBuilder)) Sensor
Rebuilds the instance.
inherited
toBridgeObject({String? action}) Map
toBuilder() SensorBuilder
Converts the instance to a builder B.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

serializer → Serializer<Sensor>
no setter