Guten Morgen zusammen.
Kann mir jemand helfen ich möchte gerne
ein Servomotor ansteuern über ein ESP32S Aber ich bekomme andauernd Fehlermeldungen. Leider bin ich in Homassistent noch nicht so fit.
Was ist an diesem Code falsch? Ich würde mich freuen wenn jemand mir weiterhelfen könnte, da ich die Steuerung undbedingt benötige.
Ich danke euch schon mal und wünsche euch schonmal schöne Weihnachtsfeiertage.
substitutions:
name: esphome-web-09d6cc
friendly_name: Rechte_Terra
esphome:
name: ${name}
friendly_name: ${friendly_name}
min_version: 2024.6.0
name_add_mac_suffix: false
project:
name: esphome.web
version: dev
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Allow Over-The-Air updates
ota:
- platform: esphome
# Allow provisioning Wi-Fi via serial
improv_serial:
wifi:
# Set up a wifi access point
ap: {}
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device via WiFi AP.
captive_portal:
dashboard_import:
package_import_url: github://esphome/example-configs/esphome-web/esp32.yaml@main
import_full_config: true
# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
authorizer: none
# To have a "next url" for improv serial
web_server:
output:
- platform: ledc
pin: GPIO13 # Ersetzen Sie durch den gewünschten GPIO-Pin
frequency: 50 Hz
id: pwm_output
# Enable Home Assistant API
api:
services:
- service: control_servo
variables:
then:
- servo.write:
id: my_servo
level: -100.0%
# Templated
- servo.write:
id: my_servo
# For template values, range is [-1; 1]
level: !lambda |-
if (id(my_binary_sensor).state) {
return 1.0;
} else {
return -1.0;
}
Viele Grüße aus Hessen