mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-11-17 06:50:17 +00:00
576 B
576 B
title, sidebar_label, id, original_id
| title | sidebar_label | id | original_id |
|---|---|---|---|
| Creating components | Introduction | version-0.72-creating_component_index | 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.
DOMAIN = 'hello_state'
def setup(hass, config):
hass.states.set('hello.world', 'Paulus')
return True