Advertisement
penright

Untitled

Jan 11th, 2022
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.60 KB | None | 0 0
  1. esphome:
  2.   name: esphome_network_cab_bt
  3.   platform: ESP32
  4.   board: esp32doit-devkit-v1
  5.  
  6. wifi:
  7.   ssid: xxx
  8.   password:xxx
  9.   use_address:xxx
  10.  
  11.  
  12.   # Enable fallback hotspot (captive portal) in case wifi connection fails
  13.   ap:
  14.     ssid: 'FB Portal'
  15.     password: xxxxx
  16.  
  17. captive_portal:
  18. # Enable logging
  19. logger:
  20.   level: DEBUG
  21.  
  22. # Enable Home Assistant API
  23. api:
  24.   password: xxx
  25.  
  26. ota:
  27.   password: xxxx
  28.  
  29.  
  30.  
  31. status_led:
  32.   pin:
  33.     number: GPIO02
  34.     inverted: True
  35. switch:
  36.   - platform: restart
  37.     name: "Restart Network Cab ESPHome"
  38.    
  39. esp32_ble_tracker:
  40. text_sensor:
  41.   - platform: template
  42.     name: "ATC Heartbeat (4D)"
  43.     id: heartbeat43d
  44.  
  45.  
  46. sensor:
  47. #-------------------------------------------------------------------------------
  48. #A
  49.   - platform: pvvx_mithermometer
  50.     mac_address: "A4:C1:38:4F:19:3D"
  51.     temperature:
  52.       name: "ATC Temperature (4)"
  53.       on_value:
  54.        - text_sensor.template.publish:
  55.           id: heartbeat4d
  56.           state: !lambda |-
  57.                    time_t rawtime;
  58.                    struct tm * timeinfo;
  59.                    char buffer [80];
  60.                    time (&rawtime);
  61.                    timeinfo = localtime (&rawtime);
  62.                    strftime (buffer,80,"%m/%d/%Y %H:%M:%S",timeinfo);
  63.                    return std::string(buffer);
  64.     humidity:
  65.       name: "ATC Humidity (4)"
  66.       on_value:
  67.        - text_sensor.template.publish:
  68.           id: heartbeat4fd
  69.           state: !lambda |-
  70.                    time_t rawtime;
  71.                    struct tm * timeinfo;
  72.                    char buffer [80];
  73.                    time (&rawtime);
  74.                    timeinfo = localtime (&rawtime);
  75.                    strftime (buffer,80,"%m/%d/%Y %H:%M:%S",timeinfo);
  76.                    return std::string(buffer);
  77.     battery_level:
  78.       name: "ATC Battery-Level (4)"
  79.       on_value:
  80.        - text_sensor.template.publish:
  81.           id: heartbeat4f
  82.           state: !lambda |-
  83.                    time_t rawtime;
  84.                    struct tm * timeinfo;
  85.                    char buffer [80];
  86.                    time (&rawtime);
  87.                    timeinfo = localtime (&rawtime);
  88.                    strftime (buffer,80,"%m/%d/%Y %H:%M:%S",timeinfo);
  89.                    return std::string(buffer);
  90.     flag_value:
  91.       name: "ATC Flag Value (4)"
  92.     battery_voltage:
  93.       name: "ATC Battery-Voltage (4)"  
  94.  
  95. binary_sensor:
  96.   - platform: pvvx_mithermometer
  97.     mac_address: "A"
  98.     reed_switch:
  99.       name: "ATC Reed Switch (4D)"
  100.  
  101. #===================================================================================
  102.  
  103.  
  104.  
  105.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement