virtual_device

package
v2.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DeviceTypeAirConditioner         = "air_conditioner"
	DeviceTypeAirCooler              = "air_cooler"
	DeviceTypeAirFreshener           = "air_freshener"
	DeviceTypeAirPurifier            = "air_purifier"
	DeviceTypeAudioVideoReceiver     = "audio_video_receiver"
	DeviceTypeAwning                 = "awning"
	DeviceTypeBathtub                = "bathtub"
	DeviceTypeBed                    = "bed"
	DeviceTypeBlinds                 = "blinds"
	DeviceTypeBlender                = "blender"
	DeviceTypeBoiler                 = "boiler"
	DeviceTypeCamera                 = "camera"
	DeviceTypeCarbonMonoxideDetector = "carbon_monoxide_detector"
	DeviceTypeCharger                = "charger"
	DeviceTypeCloset                 = "closet"
	DeviceTypeCoffeeMaker            = "coffee_maker"
	DeviceTypeCooktop                = "cooktop"
	DeviceTypeCurtain                = "curtain"
	DeviceTypeDehumidifier           = "dehumidifier"
	DeviceTypeDehydrator             = "dehydrator"
	DeviceTypeDishwasher             = "dishwasher"
	DeviceTypeDoor                   = "door"
	DeviceTypeDoorBell               = "door_bell"
	DeviceTypeDrawer                 = "drawer"
	DeviceTypeDryer                  = "dryer"
	DeviceTypeFan                    = "fan"
	DeviceTypeFaucet                 = "faucet"
	DeviceTypeFireplace              = "fireplace"
	DeviceTypeFreezer                = "freezer"
	DeviceTypeFryer                  = "fryer"
	DeviceTypeGarageDoor             = "garage_door"
	DeviceTypeGate                   = "gate"
	DeviceTypeGrill                  = "grill"
	DeviceTypeHeater                 = "heater"
	DeviceTypeHood                   = "hood"
	DeviceTypeHumidifier             = "humidifier"
	DeviceTypeKettle                 = "kettle"
	DeviceTypeLight                  = "light"
	DeviceTypeLock                   = "lock"
	DeviceTypeMicrowave              = "microwave"
	DeviceTypeMop                    = "mop"
	DeviceTypeMower                  = "mower"
	DeviceTypeMulticooker            = "multicooker"
	DeviceTypeNetwork                = "network"
	DeviceTypeOutlet                 = "outlet"
	DeviceTypeOven                   = "oven"
	DeviceTypePergola                = "pergola"
	DeviceTypePetFeeder              = "pet_feeder"
	DeviceTypePressureCooker         = "pressure_cooker"
	DeviceTypeRadiator               = "radiator"
	DeviceTypeRefrigerator           = "refrigerator"
	DeviceTypeRemoteControl          = "remote_control"
	DeviceTypeRouter                 = "router"
	DeviceTypeScene                  = "scene"
	DeviceTypeSecuritySystem         = "security_system"
	DeviceTypeSensor                 = "sensor"
	DeviceTypeSetTopBox              = "set_top_box"
	DeviceTypeShower                 = "shower"
	DeviceTypeShutter                = "shutter"
	DeviceTypeSmokeDetector          = "smoke_detector"
	DeviceTypeSoundbar               = "soundbar"
	DeviceTypeSousVide               = "sous_vide"
	DeviceTypeSpeaker                = "speaker"
	DeviceTypeSprinkler              = "sprinkler"
	DeviceTypeStandMixer             = "stand_mixer"
	DeviceTypeStreamingBox           = "streaming_box"
	DeviceTypeStreamingSoundbar      = "streaming_soundbar"
	DeviceTypeStreamingStick         = "streaming_stick"
	DeviceTypeSwitch                 = "switch"
	DeviceTypeTank                   = "tank" // added additionally
	DeviceTypeThermostat             = "thermostat"
	DeviceTypeTelevision             = "television"
	DeviceTypeVacuum                 = "vacuum"
	DeviceTypeValve                  = "valve"
	DeviceTypeWasher                 = "washer"
	DeviceTypeWaterHeater            = "water_heater"
	DeviceTypeWaterPurifier          = "water_purifier"
	DeviceTypeWaterSoftener          = "water_softener"
	DeviceTypeWeatherStation         = "weather_station" // added additionally
	DeviceTypeWindow                 = "window"
	DeviceTypeYogurtMaker            = "yogurt_maker"
)

as a reference taken from google smart home https://developers.google.com/assistant/smarthome/guides

View Source
const (
	DeviceTraitAppSelector        = "app_selector"
	DeviceTraitArmDisarm          = "arm_disarm"
	DeviceTraitBrightness         = "brightness"
	DeviceTraitCameraStream       = "camera_stream"
	DeviceTraitChannel            = "channel"
	DeviceTraitColorSetting       = "color_setting"
	DeviceTraitCook               = "cook"
	DeviceTraitDispense           = "dispense"
	DeviceTraitDock               = "dock"
	DeviceTraitEnergyStorage      = "energy_storage"
	DeviceTraitFanSpeed           = "fan_speed"
	DeviceTraitFill               = "fill"
	DeviceTraitHumiditySetting    = "humidity_setting"
	DeviceTraitInputSelector      = "input_selector"
	DeviceTraitLightEffects       = "light_effects"
	DeviceTraitLocator            = "locator"
	DeviceTraitLockUnlock         = "lock_unlock"
	DeviceTraitMediaState         = "media_state"
	DeviceTraitModes              = "modes"
	DeviceTraitNetworkControl     = "network_control"
	DeviceTraitObjectDetection    = "object_detection"
	DeviceTraitOnOff              = "on_off"
	DeviceTraitOpenClose          = "open_close"
	DeviceTraitReboot             = "reboot"
	DeviceTraitRotation           = "rotation"
	DeviceTraitRunCycle           = "run_cycle"
	DeviceTraitSensorState        = "sensor_state"
	DeviceTraitScene              = "scene"
	DeviceTraitSoftwareUpdate     = "software_update"
	DeviceTraitStartStop          = "start_stop"
	DeviceTraitStatusReport       = "status_report"
	DeviceTraitTemperatureControl = "temperature_control"
	DeviceTraitTemperatureSetting = "temperature_setting"
	DeviceTraitTimer              = "timer"
	DeviceTraitToggles            = "toggles"
	DeviceTraitTransportControl   = "transport_control"
	DeviceTraitVolume             = "volume"
)

as a reference taken from google smart home https://developers.google.com/assistant/smarthome/traits

View Source
const (
	ResourceByQuickID = "resource_by_quick_id"
	ResourceByLabels  = "resource_by_labels"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	Type           string               `json:"type" yaml:"type"`
	ResourceType   string               `json:"resourceType" yaml:"resourceType"`
	QuickID        string               `json:"quickId" yaml:"quickId"`
	Labels         cmap.CustomStringMap `json:"labels" yaml:"labels"`
	Value          interface{}          `json:"-" yaml:"-"`
	ValueTimestamp time.Time            `json:"-" yaml:"-"`
}

type VirtualDevice

type VirtualDevice struct {
	ID          string               `json:"id" yaml:"id"`
	Name        string               `json:"name" yaml:"name"`
	Description string               `json:"description" yaml:"description"`
	Enabled     bool                 `json:"enabled" yaml:"enabled"`
	DeviceType  string               `json:"deviceType" yaml:"deviceType"`
	Traits      map[string]Resource  `json:"traits" yaml:"traits"`
	Location    string               `json:"location" yaml:"location"`
	Labels      cmap.CustomStringMap `json:"labels" yaml:"labels"`
	ModifiedOn  time.Time            `json:"modifiedOn" yaml:"modifiedOn"`
	Resources   []string             `json:"resources" yaml:"resources"`
}

VirtualDevice struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL