Files
developers.home-assistant/website/versioned_docs/version-0.72/creating_component_index.md
Paulus Schoutsen 13d8709e60 Version 0.72
2018-06-29 11:02:13 -04:00

22 lines
576 B
Markdown

---
title: Creating components
sidebar_label: Introduction
id: version-0.72-creating_component_index
original_id: creating_component_index
---
Alright, you're ready to make your first component. AWESOME. Don't worry, we've tried hard to keep it as easy as possible.
### Example component
Add `hello_state:` to your `configuration.yaml` file and create a file `<config_dir>/custom_components/hello_state.py` with the below code to test it locally.
```python
DOMAIN = 'hello_state'
def setup(hass, config):
hass.states.set('hello.world', 'Paulus')
return True
```