From 3af32cf88958b9ffa0be60f6fc39f58603f1ad1e Mon Sep 17 00:00:00 2001 From: EBOOZ Date: Sat, 20 Feb 2021 13:58:05 +0100 Subject: [PATCH] Configuration has been moved to Settings.ps1 --- Get-TeamsStatus.ps1 | 29 ++--------------------------- Settings.ps1 | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 Settings.ps1 diff --git a/Get-TeamsStatus.ps1 b/Get-TeamsStatus.ps1 index 3f0b18e..4c400bf 100644 --- a/Get-TeamsStatus.ps1 +++ b/Get-TeamsStatus.ps1 @@ -23,33 +23,8 @@ # Configuring parameter for interactive run Param($SetStatus) -# Configure the variables below that will be used in the script -$HAToken = "" # Example: eyJ0eXAiOiJKV1... -$UserName = "" # When not sure, open a command prompt and type: echo %USERNAME% -$HAUrl = "" # Example: https://yourha.duckdns.org - -# Set language variables below -$lgAvailable = "Available" -$lgBusy = "Busy" -$lgOnThePhone = "On the phone" -$lgAway = "Away" -$lgBeRightBack = "Be right back" -$lgDoNotDisturb = "Do not disturb" -$lgFocusing = "Focusing" -$lgInAMeeting = "In a meeting" -$lgOffline = "Offline" -$lgNotInACall = "Not in a call" -$lgInACall = "In a call" - -# Set icons to use for call activity -$iconInACall = "mdi:phone-in-talk-outline" -$iconNotInACall = "mdi:phone-off" -$iconMonitoring = "mdi:api" - -# Set entities to post to -$entityStatus = "sensor.teams_status" -$entityActivity = "sensor.teams_activity" -$entityHeartbeat = "binary_sensor.teams_monitoring" +# Import Settings PowerShell script +. ($PSScriptRoot + "\Settings.ps1") ################################################################ # Don't edit the code below, unless you know what you're doing # diff --git a/Settings.ps1 b/Settings.ps1 new file mode 100644 index 0000000..f5dbb43 --- /dev/null +++ b/Settings.ps1 @@ -0,0 +1,27 @@ +# Configure the variables below that will be used in the script +$HAToken = "" # Example: eyJ0eXAiOiJKV1... +$UserName = "" # When not sure, open a command prompt and type: echo %USERNAME% +$HAUrl = "" # Example: https://yourha.duckdns.org + +# Set language variables below +$lgAvailable = "Available" +$lgBusy = "Busy" +$lgOnThePhone = "On the phone" +$lgAway = "Away" +$lgBeRightBack = "Be right back" +$lgDoNotDisturb = "Do not disturb" +$lgFocusing = "Focusing" +$lgInAMeeting = "In a meeting" +$lgOffline = "Offline" +$lgNotInACall = "Not in a call" +$lgInACall = "In a call" + +# Set icons to use for call activity +$iconInACall = "mdi:phone-in-talk-outline" +$iconNotInACall = "mdi:phone-off" +$iconMonitoring = "mdi:api" + +# Set entities to post to +$entityStatus = "sensor.teams_status" +$entityActivity = "sensor.teams_activity" +$entityHeartbeat = "binary_sensor.teams_monitoring" \ No newline at end of file