Skip to content
@home-assistant-tutorials

Home Assistant Tutorials

Tutorials shipped as git repositories

Welcome

This organization has the purpose to bundle some tutorials about Home Assistant. For the beginning the scope is the development of custom code like cards or integrations.

Howto

Each tutorial is done as a separate github repository to be able to ship code alongside. To learn how to set up the development environment at all see tutorial 1.

Depending on the type of the tutorial the repository is cloned into different "workspaces". Tutorials of cards are cloned into a frontend workspace with the path config/www/tutor. A hello-moon repository would get the path config/www/tutor/hello-moon.

Tutorials

Table of contents

  • how to use the container of the core developers
  • how to get some hello world output from a card
  • how to define the card as a custom Element of HTML
  • how to add the card as a new resource
  • how to assist the setup with error messages
  • how to provide a default configuration for the card
  • how to add the card to the visual selection
  • how to do an interactive toggle card with plain vanilla javascript
  • how to create the toggle helper entity
  • how to organize the class
  • how to encapsulate CSS by use of a prefix (BEM inspired)
  • how to read and write from/to the hass object (full roundtrip)
  • how to bind the card to the event callback
  • how to attach a shadow dom inside the constructor
  • how to clean up the lifecycle
  • how to get rid of the prefixes
  • how to migrate from BEM methodology to nested CSS modifiers
  • how to create and organize the class of the editor
  • how to register the editor
  • about the lifecycle of the editor
  • how to implement minimal requirements
  • how to install HACS
  • how to layout the Github repository for a custom HACS card
  • how to use the HACS repository
  • how to install nodejs and npm into the development container
  • how to update them to recent versions
  • how to use npm (the basics)
  • how to install Parcel
  • how to setup and organize the projects layout
  • how to inline HTML and CSS files
  • what Lit is
  • how to install Lit with NPM
  • how it differs from vanilla javascript
  • how to use it for the card editor
  • how to use it for the toggle card
  • how to keep the footprint small
  • how to install the required tools for TypeScript
  • how to set up the configuration files
  • how to migrate the code to TypoScript
  • how to enrich the code with typing
  • how to import some interfaces for custom card development

Home Assistant

This organization provides community created content. It is related to the Home Assistant project. It is not an official part of it.

Popular repositories Loading

  1. 01.development-environment 01.development-environment Public

    Setting up the development environment for the tutorials

    18 2

  2. 02.hello-world-card 02.hello-world-card Public

    Writing your first card for Home Assistant

    JavaScript 11 12

  3. 10.toggle-card-typescript 10.toggle-card-typescript Public

    Building a toggle card with TypeScript

    TypeScript 7 5

  4. 05.toggle-card-with-shadow-dom 05.toggle-card-with-shadow-dom Public

    Toggle card done in plain vanilla JS with a shadow DOM

    JavaScript 6 2

  5. 03.hello-world-card-plus 03.hello-world-card-plus Public

    Improving the hello world card

    JavaScript 5 3

  6. 04.toggle-card-vanilla-js 04.toggle-card-vanilla-js Public

    A simple toggle card done with plain vanilla JavaScript

    JavaScript 5 3

Repositories

Showing 10 of 12 repositories
  • 04.toggle-card-vanilla-js Public

    A simple toggle card done with plain vanilla JavaScript

    home-assistant-tutorials/04.toggle-card-vanilla-js’s past year of commit activity
    JavaScript 5 3 0 1 Updated Dec 9, 2023
  • 08.toggle-card-with-toolchain Public

    Setting up a toolchain: nodejs, npm, parcel

    home-assistant-tutorials/08.toggle-card-with-toolchain’s past year of commit activity
    JavaScript 4 3 0 0 Updated Jun 29, 2023
  • 20.mermaid-card Public

    Mermaid - Diagramming and charting tool for Home Assistant

    home-assistant-tutorials/20.mermaid-card’s past year of commit activity
    JavaScript 0 0 0 0 Updated Jun 11, 2023
  • 10.toggle-card-typescript Public

    Building a toggle card with TypeScript

    home-assistant-tutorials/10.toggle-card-typescript’s past year of commit activity
    TypeScript 7 5 0 0 Updated Jun 5, 2023
  • .github Public

    Face of the home-assistant-tutorials organisation

    home-assistant-tutorials/.github’s past year of commit activity
    0 0 0 0 Updated Jun 4, 2023
  • 09.toggle-card-lit Public

    Extending the toggle card from LitElement

    home-assistant-tutorials/09.toggle-card-lit’s past year of commit activity
    JavaScript 4 1 0 0 Updated Jun 3, 2023
  • 01.development-environment Public

    Setting up the development environment for the tutorials

    home-assistant-tutorials/01.development-environment’s past year of commit activity
    18 2 1 0 Updated May 24, 2023
  • 02.hello-world-card Public

    Writing your first card for Home Assistant

    home-assistant-tutorials/02.hello-world-card’s past year of commit activity
    JavaScript 11 12 1 0 Updated May 24, 2023
  • 03.hello-world-card-plus Public

    Improving the hello world card

    home-assistant-tutorials/03.hello-world-card-plus’s past year of commit activity
    JavaScript 5 3 1 0 Updated May 24, 2023
  • 06.toggle-with-graphical-configuration Public

    Adding a graphical configuration to the toggle card (vanilla javascript)

    home-assistant-tutorials/06.toggle-with-graphical-configuration’s past year of commit activity
    JavaScript 3 1 0 0 Updated May 24, 2023

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…