isaacrlevin / presencelight

PresenceLight is a solution to broadcast your various statuses to light bulbs.
MIT License
419 stars 77 forks source link

Command line option to set status and enable/disable sync? #863

Closed Absoblogginlutely closed 6 months ago

Absoblogginlutely commented 6 months ago

Is your feature request related to a problem? Please describe. Would love to be able to temporarily disable and enable the Teams Sync from command line and optionally set status. Bonus points to write that Status back to Teams. I recognise this might be too much of a scope creep though.

Describe the solution you'd like Ability to run set-presencelight -sync $false -Status "On Phone" or set-presencelight -sync $true -Status "Available" This would allow me to stop the sync when a phone call comes in on another phone system (as Teams would show as available) and set status to be on the phone so the light stays on. When my phone call finishes, I can then set the status back to available and the light would turn off

Describe alternatives you've considered Writing script to kill Presencelight with get-process presencelight | stop-process This however does not set the light status but I could potentially include api calls to set that

Additional context Add any other context or screenshots about the feature request here.

isaacrlevin commented 6 months ago

Hey there! Would you be interested in opening a PR with this functionality? Take a look at the CONTRIBUTORS Guide

Absoblogginlutely commented 6 months ago

Updating the app sounds complicated, however thinking about it more overnight, I realised if I set the presence for Teams via another script, then Presence light would see that status and then update to the existing status as required. I think that you can set the presence via the graph api now - just need a fews days to test this

isaacrlevin commented 6 months ago

You will probably need to create an Entra App if you want to update your status manually. Than you would need to get admin consent in your tenant. Doable, but not super straightforward

isaacrlevin commented 6 months ago

Going to close this as it is out of scope of the project