Skip to content

Commit

Permalink
MQTT Discovery; supporting valve entity (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichielVanwelsenaere authored Oct 16, 2024
1 parent 3fb1d81 commit d95bcf3
Show file tree
Hide file tree
Showing 4 changed files with 2,581 additions and 1,310 deletions.
8 changes: 7 additions & 1 deletion docs/FunctionBlocks/FB_OUTPUT_BINARY_MQTT.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,15 @@ FB_DO_SW_001.InitMqttDiscoveryAsLock(
Name := 'lock 001', (* The name show in Home Assistant frond-end*)
Device := ADR(PLC_DEVICE), (* The device show in Home Assistant *)
);
(* valve entity *)
FB_DO_SW_001.InitMqttDiscoveryAsValve(
Name := 'valve 001', (* The name show in Home Assistant frond-end*)
Device := ADR(PLC_DEVICE), (* The device show in Home Assistant *)
);
```

By default a 'NO' (Normally Open) contact is asumed for MQTT discovery yet this can be inverted to a 'NC' (Normally Closed) contact by leveraging the 'Invert' parameter:
By default a 'NO' (Normally Open) contact is assumed for MQTT discovery yet this can be inverted to a 'NC' (Normally Closed) contact by leveraging the 'Invert' parameter:

```
FB_DO_SW_001.InitMqttDiscoveryAsLock(
Expand Down
3,531 changes: 2,224 additions & 1,307 deletions src/Exports/CodesysV3.export

Large diffs are not rendered by default.

Loading

0 comments on commit d95bcf3

Please sign in to comment.