Equip my headphones when I listen to music
When I listen to music on rocksky.app, put on my headphones on rpg.actor
by @byjp.me
app.rocksky.scrobble- Lexicon
app.rocksky.scrobble- Operations
- Record created
Conditions
event.didequals{{self}}- Only change on your own rocksky scrobbles.
Actions (3)
Clear scheduled actionsAction 1- Remove any previous scheduled unequips this automation has queued up.
- Identifier
unequip-layer
Update a recordAction 2#1- Equip the target layer now.
- 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#2- Schedule an unequip of the layer for the predicted end of the song.
- Scheduled
- after
{{event.commit.record.duration}} + 30000milliseconds - 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 } ]