Beispielcode für einen Lüfter auf Pin 27

 avatar
unknown
plain_text
4 months ago
1.0 kB
11
No Index
esphome:
  name: pwmfan
  friendly_name: pwmfan

esp32:
  board: esp32dev
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "shglbrkgbsdrgsdsrg" #wird beim Setup generiert

ota:
  platform: esphome  # Specify the platform key
  password: "234567897654356789"

wifi:
  ssid: "Wifi Name"
  password: "WifiPasswort

    # Set a static IP address
  manual_ip:
    static_ip: 192.168.178.126  # Müsst ihr in eurem Router nachschauen
    gateway: 192.168.178.1  # Router IP hier Fritzbox
    subnet: 255.255.255.0  # Common subnet mask

  # Enable fallback hotspot (captive portal) in case WiFi connection fails
  ap:
    ssid: "Pwmfan Fallback Hotspot"
    password: "ghjkgfdsghj"

captive_portal:

# Output configurations for PWM signals
output:
  - platform: ledc
    pin: GPIO27 # Lüfter
    frequency: 5000 Hz
    id: fan_pwm_1

# Fan configurations for speed control
fan:
  - platform: speed
    output: fan_pwm_1
    name: "Lüfter"
Editor is loading...
Leave a Comment