wiegand - starting
This commit is contained in:
39
packages/devices_v0_7/wiegand.yaml
Normal file
39
packages/devices_v0_7/wiegand.yaml
Normal 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);
|
||||
Reference in New Issue
Block a user