mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-10-14 08:35:12 +02:00
rfid-reader: use a valid RTTTL default duration (d=32)
ESPHome only accepts d=1/2/4/8/16/32 now; d=24 was rejected and the success/write tones never played.
This commit is contained in:
1 parent
4bbf26fc87
commit
5fdea643a7
1 file changed
+11
-11
+11
-11
@@ -28,7 +28,7 @@ esphome:
|
|||||||
# - wait_until:
|
# - wait_until:
|
||||||
# api.connected:
|
# api.connected:
|
||||||
# - logger.log: API is connected!
|
# - logger.log: API is connected!
|
||||||
# - rtttl.play: "success:d=24,o=5,b=100:c,g,b"
|
# - rtttl.play: "success:d=32,o=5,b=100:c,g,b"
|
||||||
# - light.turn_on:
|
# - light.turn_on:
|
||||||
# id: notify_led
|
# id: notify_led
|
||||||
# brightness: 100%
|
# brightness: 100%
|
||||||
@@ -91,13 +91,13 @@ api:
|
|||||||
uri += tag_id;
|
uri += tag_id;
|
||||||
message->add_uri_record(uri);
|
message->add_uri_record(uri);
|
||||||
id(pn532_module).write_mode(message);
|
id(pn532_module).write_mode(message);
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
|
|
||||||
- action: write_music_tag
|
- action: write_music_tag
|
||||||
variables:
|
variables:
|
||||||
@@ -123,13 +123,13 @@ api:
|
|||||||
message->add_text_record(text);
|
message->add_text_record(text);
|
||||||
}
|
}
|
||||||
id(pn532_module).write_mode(message);
|
id(pn532_module).write_mode(message);
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: source
|
- id: source
|
||||||
@@ -271,7 +271,7 @@ pn532_i2c:
|
|||||||
condition:
|
condition:
|
||||||
switch.is_on: buzzer_enabled
|
switch.is_on: buzzer_enabled
|
||||||
then:
|
then:
|
||||||
- rtttl.play: "success:d=24,o=5,b=100:c,g,b"
|
- rtttl.play: "success:d=32,o=5,b=100:c,g,b"
|
||||||
on_tag_removed:
|
on_tag_removed:
|
||||||
then:
|
then:
|
||||||
- homeassistant.event:
|
- homeassistant.event:
|
||||||
@@ -313,13 +313,13 @@ button:
|
|||||||
message->add_uri_record(uri);
|
message->add_uri_record(uri);
|
||||||
ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str());
|
ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str());
|
||||||
id(pn532_module).write_mode(message);
|
id(pn532_module).write_mode(message);
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: Clean Tag
|
name: Clean Tag
|
||||||
id: clean_tag
|
id: clean_tag
|
||||||
@@ -333,13 +333,13 @@ button:
|
|||||||
green: 64.7%
|
green: 64.7%
|
||||||
blue: 0%
|
blue: 0%
|
||||||
- lambda: 'id(pn532_module).clean_mode();'
|
- lambda: 'id(pn532_module).clean_mode();'
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: Cancel writing
|
name: Cancel writing
|
||||||
id: cancel_writing
|
id: cancel_writing
|
||||||
@@ -349,7 +349,7 @@ button:
|
|||||||
- lambda: 'id(pn532_module).read_mode();'
|
- lambda: 'id(pn532_module).read_mode();'
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: esp32_rmt_led_strip
|
- platform: esp32_rmt_led_strip
|
||||||
|
|||||||
Reference in new issue
Block a user