Documentation
¶
Overview ¶
Package fulfillment implements a server that responds to Google Smart Home "fulfilment" requests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailableFanSpeeds ¶
type AvailableFanSpeeds struct { Speeds []FanSpeedSetting `json:"speeds"` Ordered bool `json:"ordered"` }
type FanSpeedAttributes ¶
type FanSpeedAttributes struct { // If set to true, this device supports blowing the fan in both directions // and can accept the command to reverse fan direction. Reversible bool `json:"reversible"` // Indicates if the device supports using one-way (true) or two-way (false) // communication. Set this attribute to true if the device cannot respond to // a QUERY intent or Report State for this trait. CommandOnlyFanSpeed bool `json:"commandOnlyFanSpeed"` // If set to true, this device will accept commands for adjusting the speed // using a percentage from 0.0 to 100.0. SupportsFanSpeedPercent bool `json:"supportsFanSpeedPercent"` // List of available fan speeds. AvailableFanSpeeds AvailableFanSpeeds `json:"availableFanSpeeds"` }
Attributes for the FanSpeed attribute, "action.devices.traits.FanSpeed".
Described here: https://developers.google.com/assistant/smarthome/traits/fanspeed.
func (*FanSpeedAttributes) AddToDevice ¶
func (a *FanSpeedAttributes) AddToDevice(dev *smarthome.Device)
AddToDevice adds the attributes to the given Device object.
func (*FanSpeedAttributes) TraitName ¶
func (a *FanSpeedAttributes) TraitName() TraitName
type FanSpeedSetting ¶
type FanSpeedSetting struct { SpeedName string `json:"speed_name"` SpeedValues []FanSpeedValue `json:"speed_values"` }
type FanSpeedState ¶
type FanSpeedValue ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(psc *pubsub.Client, ssc cpb.StateServiceClient) *Service
func (*Service) DebugHandler ¶
DebugHandler returns a handler for debug requests.
func (*Service) GoogleFulfillmentHandler ¶
GoogleFulfillmentHandler returns a handler for fulfillment requests.
type SetFanSpeedNameCommand ¶
type SetFanSpeedNameCommand struct { // The request fan speed name. FanSpeed string `json:"fanSpeed"` }
type SetFanSpeedPercentCommand ¶
type SetFanSpeedPercentCommand struct { // The requested speed setting percentage. FanSpeedPercent float32 `json:"fanSpeedPercent"` }
Click to show internal directories.
Click to hide internal directories.