wiegand - starting

This commit is contained in:
2026-04-10 22:14:31 +02:00
parent ccace5d946
commit de7470c784
2 changed files with 42 additions and 2 deletions

View File

@@ -0,0 +1,39 @@
external_components:
- source: github://nielsfaber/esphome-wiegand@main
components: [wiegand]
text_sensor:
- platform: template
name: 'Wiegand 1 Tag'
id: wiegand_1_tag
icon: mdi:card-account-details
entity_category: ""
- platform: template
name: 'Wiegand 2 Tag'
id: wiegand_2_tag
icon: mdi:card-account-details
entity_category: ""
wiegand:
- id: wiegand_reader_1
d0: GPIO34
d1: GPIO35
on_tag:
- text_sensor.template.publish:
id: wiegand_1_tag
state: !lambda 'return x;'
on_key:
- lambda: |-
ESP_LOGI("wiegand1", "Klawisz: %c", x);
- id: wiegand_reader_2
d0: GPIO36
d1: GPIO39
on_tag:
- text_sensor.template.publish:
id: wiegand_2_tag
state: !lambda 'return x;'
on_key:
- lambda: |-
ESP_LOGI("wiegand2", "Klawisz: %c", x);