Equip my headphones when I listen to music

When I listen to music on rocksky.app, put on my headphones on rpg.actor

app.rocksky.scrobble
Lexicon
app.rocksky.scrobble
Operations
Record created

Steps (5)

Conditiongate
  • Continue only if event.did equals {{self}} - Only change on your own rocksky scrobbles.
VariablelayerID
Value
headwear
Note
The ID of the layed that will be equipped when playing, and unequipped when not.

Clear scheduled actionsAction 1action1- Remove any previous scheduled unequips this automation has queued up.

Identifier
unequip-layer

Update a recordAction 2#1action2

Target Collection
actor.rpg.generator
Base Record URI
at://{{self}}/actor.rpg.generator/self
Update mode
JSON Patch (deep)
Patch Ops (RFC 6902)
[
  {
    "op": "add",
    "path": "/updatedAt",
    "value": "{{now}}"
  },
  {
    "op": "add",
    "path": "$.layers[[email protected]=='{{layerID}}'].equipped",
    "value": true
  }
]

Update a recordAction 3#2action3

Scheduled
after {{event.commit.record.duration}} + 30000 milliseconds
Schedule identifier
unequip-layer
Target Collection
actor.rpg.generator
Base Record URI
at://{{self}}/actor.rpg.generator/self
Update mode
JSON Patch (deep)
Patch Ops (RFC 6902)
[
  {
    "op": "add",
    "path": "/updatedAt",
    "value": "{{now}}"
  },
  {
    "op": "add",
    "path": "$.layers[[email protected]=='{{layerID}}'].equipped",
    "value": false
  }
]