Skip to content

Commit

Permalink
more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
b2un0 committed Nov 16, 2023
1 parent 098443a commit 8af8c22
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions examples/wireguard_edit_defaultroute_off.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// published to "MQTT_TOPIC=fritz2mqtt"
{
"page": "wireguard_edit",
"uid": "connection6", // internal name of the target connection
"accessdefaultroute": "off",
"apply": null // mandatory!
}
7 changes: 7 additions & 0 deletions examples/wireguard_edit_defaultroute_on.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// published to "MQTT_TOPIC=fritz2mqtt"
{
"page": "wireguard_edit",
"uid": "connection6", // internal name of the target connection
"accessdefaultroute": "on",
"apply": null // mandatory!
}
File renamed without changes.
11 changes: 11 additions & 0 deletions home_assistant/automation_shareWireguard_watch_edit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
alias: AVM FRITZ!Box - mqtt watch wireguard_edit
trigger:
- platform: mqtt
topic: fritz2mqtt/wireguard_edit
condition: []
action:
- service: mqtt.publish
data:
payload: "{ \"page\": \"shareWireguard\" }"
topic: fritz2mqtt
mode: single
28 changes: 28 additions & 0 deletions home_assistant/mqtt_switch_wireguard_connection_default_route.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
mqtt:
switch:
- unique_id: mqtt_fritz_7590_ax_connection6_route
name: "FRITZ!Box 7590 AX VPN Connection6 Route"
icon: "mdi:vpn"
command_topic: "fritz2mqtt"
payload_on: >-
{
"page": "wireguard_edit",
"uid": "connection6",
"accessdefaultroute": "on",
"apply": null
}
payload_off: >-
{
"page": "wireguard_edit",
"uid": "connection6",
"accessdefaultroute": "off",
"apply": null
}
state_topic: "fritz2mqtt/shareWireguard"
state_on: 1
state_off: 0
value_template: "{{ value_json.data.init.boxConnections.connection6.accessDefaultRoute }}"
availability:
- topic: "fritz2mqtt/shareWireguard"
value_template: "{{ value_json.data.init.boxConnections.connection6.active }}"
payload_available: true
File renamed without changes.

0 comments on commit 8af8c22

Please sign in to comment.