Congrats on the Sonos integration, great to see a fully featured inbuilt solution.
Is there capacity to add alarm control as switches, I’m not looking to set alarms in Hubitat but would like to see existing alarms available as switches to enable them to be turned on and off in rule machine - this is how they are exposed in Home Assistant and IMHO would be a great addition the Hubitat integration.
Not mute the player as the alarm activation would override that.
My use case would be to turn the alarm off on public holidays, we usually forget and get woken up way earlier than required.
I have automations that check a google calendar and modify actions based off that, I.e roller shutters don’t go up till 9.00 am, day mode is triggered at 9.00 instead of 5.50 etc.
When I say turn off, I mean switch off the alarm prior to it going off not post alarm.
FWIW, my approach was the opposite. I deleted all my Sonos alarms, and just use Hubitat to control Sonos players as part of a morning wake up routine or a goodnight routine. Our alarms are set using iOS devices. Happy to share the iOS shortcut used to set an arbitrary alarm time on the Hubitat hub if you’re interested.
Can your alarm turn on and off a virtual switch? If so, then it would be easy to trigger Sonos to do what ever you wanted. My doorbell triggers a barking MP3 file to play on my sonos while we are away.
Yes, a stop command with stop a player that was triggered by an alarm. I believe the OP wanted to disable/enable the alarm from RM before it fired. That's possible in the Sonos App:
Via the HTTP API, I believe there are undocumented (?) actions to manage alarms - See: AlarmClock | Sonos API - See the "enabled" boolean in the UpdateAlarm action.
Overall, I'm not saying I agree with the OPs request, but I do understand it. - Personally, I would remove the alarms from Sonos entirely, and just handle it all in RM, and trigger the appropiate wakeup music/etc based on RM logic around holidays, etc. - Apparently, the OP likes the current Sonos App interface, and want's to continue to use that approach.
The above is just to give some context, hopefully.
With one modification. Using RM on our phones to set/change an alarm time is a little cumbersome. So I use an Apple Shortcut along with MakerAPI & a hub variable to set a wake up alarm time that is a trigger in RM. The shortcut can be accessed as an iOS app.
This is correct, when j say switch capability what happens in HA is individual alarms are exposes as switches, HE may not handle Sonos in the same manner therefore it may not be possible hence the question.
I could use HE to manage alarms as a whole, however Sonos integration has been flakey up to this point - hopefully this integration changes that.
Screenshot below of the HA entities of a Sonos player - setting of alarm in the Sonos app exposes a daily alarm switch.
I do have a HA instance running and could use that but I try to keep every thing in one place, otherwise things get messy- HA is purely there for my Bosch alarm panel.
We're not going to add a switch capability to the players, the best I can offer is extending the mirror apps custom mirror configuration to include applicable mapping translations for Music Player devices
these could include things like switch <-> mute, switch <-> play/stop and similar binary translations.