Dynamic Apple Watch Actions

I currently have 2 actions showing up on my apple watch, one to arm my alarm system and one to disarm. But at any given time only one action really makes sense (i.e., if system is armed, only disarm makes sense). I would like to have only one action show up at any given time with of course the text and icon reflecting the appropriate state. Is this possible?

Currently I have set up the actions thru the mobile app and don’t see them as entities in the States screen of Developer Tools. Does setting them up thru yaml make it possible to change them on the fly? (I did not see anything in the Mobile App documentation about this).

1 Like

I think actions are static and cannot be customized the way you want…
Alternative solution:

  • create watch face complication showing alarm state (via text or icon, depending on complication you choose)
  • create toggle automation (to arm if off and to disarm if active)
  • create single action on the watch to run this automation

This way you can easily check state and are only 2 taps away from arming/disarming.

Yes I was thinking of a toggle action on the watch. I have not played with complications yet but is there a way to get the sensor to show up on the same screen as the action button in the watch app? That would keep everything on one screen.

Also do complications update pretty much immediately when a sensor changes or are the sensors polled periodically?

I did not played too much with complications… But I think your concern migh tbe right, I think I read somwhere that they refresh every 15 minutes or so… So counting on complication to show proper state of alarm might be risky.
Actions are static I think, there is no possibility for changing state or text or color dynamically. Thought this might be a great area for app improvement… unless again Apple limits refreshes to 15 minutes, as for complications.

My current strategy is to just send a notification after the action button that confirms whether the action worked and what the resulting alarm state is. Doesn’t help you know the alarm state before the action button is pushed but I guess usually the user would already know that.

On a related topic, is it possible to force a notification to go the watch (even if the phone is unlocked)? If it goes to both the phone and the watch, that is OK. The only way I saw online was disabling wrist detection on the watch which is too big of a hammer for me.