Working next and previous track buttons
This commit is contained in:
@@ -42,11 +42,6 @@ pn532_i2c:
|
|||||||
- logger.log: "RIMOSSO TAG!!!!"
|
- logger.log: "RIMOSSO TAG!!!!"
|
||||||
- dfplayer.pause
|
- dfplayer.pause
|
||||||
|
|
||||||
binary_sensor:
|
|
||||||
- platform: pn532
|
|
||||||
uid: 74-10-37-94
|
|
||||||
name: "PN532 NFC Tag"
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------- DFPlayer MP3 Player ----------------------
|
# ---------------------- DFPlayer MP3 Player ----------------------
|
||||||
|
|
||||||
@@ -62,7 +57,101 @@ dfplayer:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
# ---------------------- NFC TAG Sensor ----------------------
|
||||||
|
- platform: pn532
|
||||||
|
uid: 74-10-37-94
|
||||||
|
name: "PN532 NFC Tag"
|
||||||
|
# ---------------------- Phisical buttons ----------------------
|
||||||
|
# - platform: gpio
|
||||||
|
# pin:
|
||||||
|
# number: D3
|
||||||
|
# mode:
|
||||||
|
# input: true
|
||||||
|
# pullup: true
|
||||||
|
# id: "vol_down"
|
||||||
|
# name: "Volume down"
|
||||||
|
# filters:
|
||||||
|
# - settle: 10ms
|
||||||
|
# - autorepeat:
|
||||||
|
# time_off: 200ms
|
||||||
|
# time_on: 200ms
|
||||||
|
# on_press:
|
||||||
|
# then:
|
||||||
|
# - dfplayer.volume_down
|
||||||
|
# - platform: gpio
|
||||||
|
# pin:
|
||||||
|
# number: D4
|
||||||
|
# mode:
|
||||||
|
# input: true
|
||||||
|
# pullup: true
|
||||||
|
# id: "vol_up"
|
||||||
|
# name: "Volume up"
|
||||||
|
# filters:
|
||||||
|
# - settle: 10ms
|
||||||
|
# - autorepeat:
|
||||||
|
# time_off: 200ms
|
||||||
|
# time_on: 200ms- platform: gpio
|
||||||
|
# pin:
|
||||||
|
# number: D3
|
||||||
|
# mode:
|
||||||
|
# input: true
|
||||||
|
# pullup: true
|
||||||
|
# id: "vol_down"
|
||||||
|
# name: "Volume down"
|
||||||
|
# filters:
|
||||||
|
# - settle: 10ms
|
||||||
|
# - autorepeat:
|
||||||
|
# time_off: 200ms
|
||||||
|
# time_on: 200ms
|
||||||
|
# on_press:
|
||||||
|
# then:
|
||||||
|
# - dfplayer.volume_down
|
||||||
|
# - platform: gpio
|
||||||
|
# pin:
|
||||||
|
# number: D4
|
||||||
|
# mode:
|
||||||
|
# input: true
|
||||||
|
# pullup: true
|
||||||
|
# id: "vol_up"
|
||||||
|
# name: "Volume up"
|
||||||
|
# filters:
|
||||||
|
# - settle: 10ms
|
||||||
|
# - autorepeat:
|
||||||
|
# time_off: 200ms
|
||||||
|
# time_on: 200ms
|
||||||
|
# on_press:
|
||||||
|
# then:
|
||||||
|
# - dfplayer.volume_up
|
||||||
|
# on_press:
|
||||||
|
# then:
|
||||||
|
# - dfplayer.volume_up
|
||||||
|
- platform: gpio
|
||||||
|
pin:
|
||||||
|
number: D5
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
pullup: true
|
||||||
|
id: "trk_prev"
|
||||||
|
name: "Previous track"
|
||||||
|
filters:
|
||||||
|
- settle: 10ms
|
||||||
|
on_press:
|
||||||
|
then:
|
||||||
|
- dfplayer.play_previous
|
||||||
|
- platform: gpio
|
||||||
|
pin:
|
||||||
|
number: D6
|
||||||
|
mode:
|
||||||
|
input: true
|
||||||
|
pullup: true
|
||||||
|
id: "trk_next"
|
||||||
|
name: "Next track"
|
||||||
|
filters:
|
||||||
|
- settle: 10ms
|
||||||
|
on_press:
|
||||||
|
then:
|
||||||
|
- dfplayer.play_next
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user