Skip to content

Instantly share code, notes, and snippets.

@blacklight
Created October 22, 2019 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blacklight/4285dd6880232a5a82b8445f2ade376b to your computer and use it in GitHub Desktop.
Save blacklight/4285dd6880232a5a82b8445f2ade376b to your computer and use it in GitHub Desktop.
event.hook.OnSensorData:
if:
type: platypush.message.event.sensor.SensorDataChangeEvent
then:
- if ${data.get('ir') == 'code1'}:
- action: music.mpd.play
- if ${data.get('ir') == 'code2'}:
- action: music.mpd.pause
- if ${data.get('ir') == 'code3'}:
- action: music.mpd.stop
- if ${data.get('ir') == 'code4'}:
- action: music.mpd.next
- if ${data.get('ir') == 'code5'}:
- action: music.mpd.previous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment