PHP Class Phue\Command\CreateSensor

Inheritance: implements Phue\Command\CommandInterface
Show file Open project: sqmk/phue Class Usage Examples

Protected Properties

Property Type Description
$attributes array Sensor attributes
$config array Config
$state array Sensor state

Public Methods

Method Description
__construct ( string $name = null ) Constructs a command
configAttribute ( string $key, mixed $value ) : self Config attribute
manufacturerName ( string $manufacturerName ) : self Set manufacturer name
modelId ( string $modelId ) : self Set model Id
name ( string $name ) : self Set name
send ( Client $client ) : integer Send command
softwareVersion ( string $softwareVersion ) : self Set software version
stateAttribute ( string $key, mixed $value ) : self State attribute
type ( string $type ) : self Set type
uniqueId ( string $uniqueId ) : self Set unique Id

Method Details

__construct() public method

Constructs a command
public __construct ( string $name = null )
$name string Name

configAttribute() public method

Config attribute
public configAttribute ( string $key, mixed $value ) : self
$key string Key
$value mixed Value
return self This object

manufacturerName() public method

Set manufacturer name
public manufacturerName ( string $manufacturerName ) : self
$manufacturerName string Manufacturer name
return self This object

modelId() public method

Set model Id
public modelId ( string $modelId ) : self
$modelId string Model Id
return self This object

name() public method

Set name
public name ( string $name ) : self
$name string Name
return self This object

send() public method

Send command
public send ( Client $client ) : integer
$client Phue\Client Phue Client
return integer Sensor Id

softwareVersion() public method

Set software version
public softwareVersion ( string $softwareVersion ) : self
$softwareVersion string Software version
return self This object

stateAttribute() public method

State attribute
public stateAttribute ( string $key, mixed $value ) : self
$key string Key
$value mixed Value
return self This object

type() public method

Set type
public type ( string $type ) : self
$type string Type of sensor
return self This object

uniqueId() public method

Set unique Id
public uniqueId ( string $uniqueId ) : self
$uniqueId string Unique Id
return self This object

Property Details

$attributes protected property

Sensor attributes
protected array $attributes
return array

$config protected property

Config
protected array $config
return array

$state protected property

Sensor state
protected array $state
return array