Documentation ¶
Index ¶
- Constants
- Variables
- type AuthDeviceInput
- type CreateCommandPayloadReturn
- type CreateDeviceInput
- type CreateDeviceReturn
- type Device
- type DeviceAuth
- type DeviceConfig
- type DeviceStatusHass
- type DeviceStatusRaw
- type GetDeviceAmbientTemperatureInput
- type GetDeviceStatesInput
- type PublishDiscoveryTopicInput
- type PublishStatesOnHomeAssistantRestartInput
- type SendCommandInput
- type SendCommandReturn
- type StartDeviceMonitoringInput
- type UpdateDeviceAvailabilityInput
- type UpdateDeviceStatesInput
- type UpdateDisplaySwitchInput
- type UpdateFanModeInput
- type UpdateModeInput
- type UpdateSwingModeInput
- type UpdateTemperatureInput
Constants ¶
View Source
const ( StatusOn byte = 1 StatusOff byte = 0 StatusOnline = "online" StatusOffline = "offline" Fahrenheit = "F" Celsius = "C" )
Variables ¶
View Source
var ( VerticalFixationStatuses = map[int]string{ 0b00000001: "top", 0b00000010: "middle1", 0b00000011: "middle2", 0b00000100: "middle3", 0b00000101: "bottom", 0b00000110: "swing", 0b00000111: "auto", } VerticalFixationStatusesInvert = map[string]int{ "top": 0b00000001, "middle1": 0b00000010, "middle2": 0b00000011, "middle3": 0b00000100, "bottom": 0b00000101, "swing": 0b00000110, "auto": 0b00000111, } FanStatuses = map[int]string{ 0b00000011: "low", 0b00000010: "medium", 0b00000001: "high", 0b00000101: "auto", 0b00000000: "none", } FanStatusesInvert = map[string]int{ "low": 0b00000011, "medium": 0b00000010, "high": 0b00000001, "auto": 0b00000101, "none": 0b00000000, } ModeStatuses = map[int]string{ 0b00000001: "cool", 0b00000010: "dry", 0b00000100: "heat", 0b00000000: "auto", 0b00000110: "fan_only", } ModeStatusesInvert = map[string]int{ "cool": 0b00000001, "dry": 0b00000010, "heat": 0b00000100, "auto": 0b00000000, "fan_only": 0b00000110, } )
View Source
var ( ErrorInvalidResultPacket = errors.New("ErrorInvalidResultPacket") ErrorInvalidResultPacketLength = errors.New("ErrorInvalidResultPacketLength") ErrorInvalidParameterTemperature = errors.New("ErrorInvalidParameterTemperature") ErrorInvalidParameterSwingMode = errors.New("ErrorInvalidParameterSwingMode") ErrorInvalidParameterFanMode = errors.New("ErrorInvalidParameterFanMode") ErrorInvalidParameterMode = errors.New("ErrorInvalidParameterMode") ErrorInvalidParameterDisplayStatus = errors.New("ErrorInvalidParameterDisplayStatus") )
Functions ¶
This section is empty.
Types ¶
type AuthDeviceInput ¶
type AuthDeviceInput struct {
Mac string
}
type CreateCommandPayloadReturn ¶
type CreateCommandPayloadReturn struct {
Payload []byte
}
type CreateDeviceInput ¶
type CreateDeviceInput struct {
Config DeviceConfig
}
type CreateDeviceReturn ¶
type CreateDeviceReturn struct {
Device Device
}
type Device ¶
type Device struct { Config DeviceConfig Auth DeviceAuth }
type DeviceAuth ¶
type DeviceConfig ¶
func (DeviceConfig) Validate ¶ added in v1.5.0
func (input DeviceConfig) Validate() error
type DeviceStatusHass ¶ added in v1.4.0
type DeviceStatusRaw ¶
type DeviceStatusRaw struct { UpdatedAt time.Time Temperature float32 Power byte FixationVertical byte Mode byte Sleep byte Display byte Mildew byte Health byte FixationHorizontal byte FanSpeed byte IFeel byte Mute byte Turbo byte Clean byte }
func (DeviceStatusRaw) ConvertToDeviceStatusHass ¶ added in v1.4.0
func (raw DeviceStatusRaw) ConvertToDeviceStatusHass() (mqttStatus DeviceStatusHass)
type GetDeviceAmbientTemperatureInput ¶
type GetDeviceAmbientTemperatureInput struct {
Mac string
}
type GetDeviceStatesInput ¶
type GetDeviceStatesInput struct {
Mac string
}
type PublishDiscoveryTopicInput ¶
type PublishDiscoveryTopicInput struct {
Device DeviceConfig
}
type PublishStatesOnHomeAssistantRestartInput ¶ added in v1.4.0
type PublishStatesOnHomeAssistantRestartInput struct {
Status string
}
type SendCommandInput ¶
type SendCommandReturn ¶
type SendCommandReturn struct {
Payload []byte
}
type StartDeviceMonitoringInput ¶
type StartDeviceMonitoringInput struct {
Mac string
}
type UpdateDeviceStatesInput ¶
type UpdateDisplaySwitchInput ¶ added in v1.4.0
func (*UpdateDisplaySwitchInput) Validate ¶ added in v1.4.0
func (input *UpdateDisplaySwitchInput) Validate() error
type UpdateFanModeInput ¶
func (UpdateFanModeInput) Validate ¶ added in v1.4.0
func (input UpdateFanModeInput) Validate() error
type UpdateModeInput ¶
func (UpdateModeInput) Validate ¶ added in v1.4.0
func (input UpdateModeInput) Validate() error
type UpdateSwingModeInput ¶
func (UpdateSwingModeInput) Validate ¶ added in v1.4.0
func (input UpdateSwingModeInput) Validate() error
type UpdateTemperatureInput ¶
func (UpdateTemperatureInput) Validate ¶ added in v1.4.0
func (input UpdateTemperatureInput) Validate() error
Click to show internal directories.
Click to hide internal directories.