Newer
Older
homeassistant_config / esphome / smartcard.yaml
@Rolf Bagge Rolf Bagge on 6 Dec 2022 735 bytes Updates
esphome:
  name: smartcard
  platform: ESP8266
  board: d1_mini

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "kA9qErLxzAH8VQB84Li1WRVvsHdFlOKVNdz6vEtqfyI="

ota:
  password: "7a876bd40942451be286989b1dece5d7"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Smartcard Fallback Hotspot"
    password: !secret wifi_password

captive_portal:
    
i2c:
  scan: False
  frequency: 400kHz    

pn532_i2c:
  id: pn532_board
  on_tag:
    then:
      - homeassistant.tag_scanned: !lambda 'return x;'

  on_tag_removed:
    then:
      - homeassistant.event:
          event: esphome.tag_removed