1.1 KiB
ESPHome custom component examples
This repository provides examples and basic empty components that can be used as templates to quickly develop your own custom components for the splendid ESPHome ESP8266/ESP32 home automation system.
How to use
All sample components can be found in the custom_components directory. The test_empty_components.yaml file provides configuration examples for the various custom components. To use a particular component for your project, do the following:
-
Create a
custom_componentsdirectory in your esphome configuration directory (the directory where your.yamlfiles are) -
Copy the directory of the empty component to
custom_componentsin its entirety, so you end up with e.g.custom_components/empty_sensor/ -
Find the configuration entry for the empty component in
test_empty.yamland copy it into your own.yamlfile. -
Compile with
esphome your_config.yaml compile(changeyour_config.yamlto your own.yamlfile) or compile with the dashboard. -
No errors? Great! You can now start modifying the empty component into your own custom component.