Phue\Condition::export PHP Method

export() public method

Export for API request
public export ( ) : stdClass
return stdClass Result object
    public function export()
    {
        $result = array('address' => "/sensors/{$this->getSensorId()}/state/{$this->getAttribute()}", 'operator' => $this->getOperator());
        if ($this->value !== null) {
            $result['value'] = $this->getValue();
        }
        return (object) $result;
    }