84 lines
1.8 KiB
YAML
84 lines
1.8 KiB
YAML
|
|
substitutions:
|
|
device_name: "kerstboom"
|
|
friendly_name: "kerstboom"
|
|
comment: "esp32-c3"
|
|
location: "zolder"
|
|
api_password: !secret kerstboom_api
|
|
ota_password: !secret ota_password
|
|
wifi_ssid: !secret wifi_ssid
|
|
wifi_password: !secret wifi_password
|
|
gateway: !secret ip_gateway
|
|
subnet: !secret ip_subnet
|
|
ip: !secret kerstboom_ip
|
|
pin_led1: GPIO3
|
|
pin_led2: GPIO4
|
|
pin_led3: GPIO1
|
|
|
|
packages:
|
|
board: !include boards/esp32-C3.yaml
|
|
device_base: !include common/common.yaml
|
|
connection: !include common/wifi.yaml
|
|
# status: !include templates/status.yaml
|
|
logger: !include templates/logger.yaml
|
|
|
|
|
|
light:
|
|
- platform: monochromatic
|
|
id: ledString1
|
|
output: led1
|
|
name: "led string 1"
|
|
|
|
- platform: monochromatic
|
|
id: ledString2
|
|
output: led2
|
|
name: "led string 2"
|
|
|
|
- platform: monochromatic
|
|
id: ledString3
|
|
output: led3
|
|
name: "led string 3"
|
|
|
|
- platform: partition
|
|
id: master
|
|
name: "Master"
|
|
restore_mode: RESTORE_DEFAULT_OFF
|
|
segments:
|
|
- single_light_id: ledString1
|
|
- single_light_id: ledString2
|
|
- single_light_id: ledString3
|
|
|
|
|
|
# Example output entry
|
|
output:
|
|
- platform: ledc
|
|
pin: ${pin_led1}
|
|
id: led1
|
|
|
|
- platform: ledc
|
|
pin: ${pin_led2}
|
|
id: led2
|
|
|
|
- platform: ledc
|
|
pin: ${pin_led3}
|
|
id: led3
|
|
|
|
esphome:
|
|
libraries:
|
|
- https://github.com/RobTillaart/ACS712.git
|
|
includes:
|
|
- include/acs712_component.h
|
|
|
|
sensor:
|
|
- platform: custom
|
|
lambda: |-
|
|
auto acs712_sensor = new ACS712Sensor();
|
|
App.register_component(acs712_sensor);
|
|
return {acs712_sensor->current_sensor, acs712_sensor->power_sensor};
|
|
sensors:
|
|
- name: "Amperes"
|
|
unit_of_measurement: A
|
|
accuracy_decimals: 2
|
|
- name: "Watts"
|
|
unit_of_measurement: W
|
|
accuracy_decimals: 2 |