-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from JonasMH/develop
Include null properties + button
- Loading branch information
Showing
9 changed files
with
118 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace ToMqttNet | ||
{ | ||
/// <summary> | ||
/// The mqtt button platform lets you send an MQTT message when the button is pressed in the frontend or the button press service is called. This can be used to expose some service of a remote device, for example reboot. | ||
/// </summary> | ||
public class MqttButtonDiscoveryConfig : MqttDiscoveryConfig<MqttButtonDiscoveryConfig> | ||
{ | ||
public override string Component => "button"; | ||
|
||
/// <summary> | ||
/// The MQTT topic to publish commands to trigger the button. | ||
/// </summary> | ||
[JsonProperty("command_topic")] | ||
public string? CommandTopic { get; set; } | ||
|
||
/// <summary> | ||
/// Defines a template to generate the payload to send to command_topic. | ||
/// </summary> | ||
[JsonProperty("command_template")] | ||
public string? CommandTemplate { get; set; } | ||
|
||
/// <summary> | ||
/// The payload To send to trigger the button. | ||
/// </summary> | ||
[JsonProperty("payload_press")] | ||
public string? PayloadPress { get; set; } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters