Skip to content

rhayun/home-assistant-custom-components

 
 

Repository files navigation

Home Assistant Custom Components

This repository contains various Custom Components I've made for use with Home Assistant.

My current developing environment is Home Assistant 0.81.2.

My Custom Components TOC

  • Domains
    • date_notifier for managing yearly, monthly, daily and one time reminders and notifications.
    • switcher_aio for a full integration with the Switcher v2 Water Heater.
  • Platforms

How do Custom Comoponents work in Home Assistant

There are two types of custom components for Home Assistant:

  • Platform components for existing domains like switch or sensor.
  • Domain components for integrating new domains.

Loading custom components is pretty straightforward as you can see in this guide.
Basically, in you configuration folder (the same folder as configuration.yaml) you create a folder called custom_components.
Everything within this folder is will be loaded to Home Assistant as components.
To create a domain you can either save your *.py file in the root folder or create a new designated folder with a __init__.py file to represent your new domain.
To create a platform for an existing domain, you create a folder named exactly like the domain you wrote the platform for and place your *.py* inside.

Here is an example of the folder structure:

  • HA configuration folder/
    • custom_components/
      • my_first_custom_domain.py
      • my_second_custom_domain/
        • __init__.py
      • sensor/
        • my_custom_sensor_platform.py
      • switch/
        • my_custom_switch_platform.py

If you want to build your own components or maybe help improve some of mine,
All you need to know in order to start doing so is in this guide.

Feel free to Watch this repository as I plan to add more components and upgrading the existing ones constantly.
If you like this repository you can even Star it. ;-)

About

Custom components for home assistant

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%