Skip to content

Commit

Permalink
Updated: some outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
chroju committed Feb 28, 2019
1 parent fc14f70 commit 708dd33
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions commands/aircon_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ func (c *AirconSendCommand) Run(args []string) int {
return 1
} else if on && settings.Button == natureremo.ButtonPowerOff {
newSettings.Button = natureremo.ButtonPowerOn
updateMessage = append(updateMessage, "OFF -> ON")
updateMessage = append(updateMessage, "POWER: OFF -> ON")
} else if off && settings.Button != natureremo.ButtonPowerOff {
newSettings.Button = natureremo.ButtonPowerOff
updateMessage = append(updateMessage, "ON -> OFF")
updateMessage = append(updateMessage, "POWER: ON -> OFF")
}

switch mode {
Expand All @@ -109,7 +109,7 @@ func (c *AirconSendCommand) Run(args []string) int {
newSettings.OperationMode = natureremo.OperationModeAuto
}
if newSettings.OperationMode != settings.OperationMode {
updateMessage = append(updateMessage, fmt.Sprintf("%s -> %s", settings.OperationMode.StringValue(), mode))
updateMessage = append(updateMessage, fmt.Sprintf("MODE: %s -> %s", settings.OperationMode.StringValue(), mode))
}

switch volume {
Expand Down Expand Up @@ -137,12 +137,12 @@ func (c *AirconSendCommand) Run(args []string) int {
newSettings.AirVolume = natureremo.AirVolumeAuto
}
if newSettings.AirVolume != settings.AirVolume {
updateMessage = append(updateMessage, fmt.Sprintf("%s -> %s", settings.AirVolume.StringValue(), volume))
updateMessage = append(updateMessage, fmt.Sprintf("VOLUME: %s -> %s", settings.AirVolume.StringValue(), volume))
}

if len(temperature) > 0 && settings.Temperature != temperature {
newSettings.Temperature = temperature
updateMessage = append(updateMessage, fmt.Sprintf("%s -> %s", settings.Temperature, temperature))
updateMessage = append(updateMessage, fmt.Sprintf("TEMP: %s -> %s", settings.Temperature, temperature))
}

if len(updateMessage) > 0 {
Expand Down

0 comments on commit 708dd33

Please sign in to comment.