36 lines
787 B
YAML
36 lines
787 B
YAML
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);
|