Skip to content

Commit

Permalink
Merge pull request #87 from dvdgeisler/feature/airpurifier_on_state
Browse files Browse the repository at this point in the history
#79 Add ON state
  • Loading branch information
TheMrBooyah authored May 11, 2023
2 parents 6bd6f61 + 0ddc8d7 commit 3165ccd
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 @@ -12,5 +12,7 @@ public enum AirPurifierFanMode {
@JsonProperty("auto")
AUTO,
@JsonProperty("off")
OFF
OFF,
@JsonProperty("on")
ON
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ protected void onDeviceCreated(final AirPurifierDevice 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_on = this.toJSON(AirPurifierFanMode.ON);
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_on = this.toJSON(AirPurifierFanMode.ON);
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 @@ -11,12 +11,14 @@ public class AirPurifierConfig {
public String name;
public Device device;
public String payload_off;
public String payload_on;
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_on;
public String state_low;
public String state_medium;
public String state_high;
Expand Down

0 comments on commit 3165ccd

Please sign in to comment.