Skip to content

Commit

Permalink
Merge pull request #86 from dvdgeisler/feature/airpurifier_to_hass
Browse files Browse the repository at this point in the history
Adjust AirPurifierFanModes
  • Loading branch information
TheMrBooyah committed May 11, 2023
2 parents 9574c23 + 03e5d09 commit 6bd6f61
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ public enum AirPurifierFanMode {
@JsonProperty("high")
HIGH,
@JsonProperty("auto")
AUTO
AUTO,
@JsonProperty("off")
OFF
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ protected void onDeviceCreated(final AirPurifierDevice device) {
config.device = this.getDeviceConfig(device);
config.command_topic = this.getTopic(device, HASS_COMPONENT, TOPIC_SET);
config.state_topic = this.getTopic(device, HASS_COMPONENT, TOPIC_STATE);
config.payload_off = this.toJSON(AirPurifierFanMode.OFF);
config.payload_low = this.toJSON(AirPurifierFanMode.LOW);
config.payload_medium = this.toJSON(AirPurifierFanMode.MEDIUM);
config.payload_high = this.toJSON(AirPurifierFanMode.HIGH);
config.payload_auto = this.toJSON(AirPurifierFanMode.AUTO);
config.state_off = this.toJSON(AirPurifierFanMode.OFF);
config.state_low = this.toJSON(AirPurifierFanMode.LOW);
config.state_medium = this.toJSON(AirPurifierFanMode.MEDIUM);
config.state_high = this.toJSON(AirPurifierFanMode.HIGH);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ public class AirPurifierConfig {
public String unique_id;
public String name;
public Device device;
public String payload_off;
public String payload_low;
public String payload_medium;
public String payload_high;
public String payload_auto;
public String command_topic;
public String state_off;
public String state_low;
public String state_medium;
public String state_high;
Expand Down

0 comments on commit 6bd6f61

Please sign in to comment.