Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Adding Tiles

Aalian Khan edited this page Dec 4, 2019 · 18 revisions

What is a tile?

A tile is the main interaction between the user and Tileboard. it is a basic square that can be modified to do different actions or show specific information. Like switching your light switch or seeing the weather for today. It is flexible and you can mould it suit your needs.

Basic Light Tile Example

We will cover the basics here but you can find more options Readme.md

{
   type: TYPES.LIGHT,
   position: [0, 0],
   title: 'Front Lights',
   subtitle: 'Lounge',
   id: 'light.front_lights',
   state: false,
   states: {
      on: "On",
      off: "Off"
   },
   icons: {
      on: "mdi-lightbulb-on",
      off: "mdi-lightbulb",
   },
},

Now its time to explain what all of this means and what we get

TYPES

First, we define the type. This tells TileBoard what type of entity this tile so it can do the proper actions when you press it. In this example, we want a little light tile to turn on or off our beautiful light in our lounge so we defined it as

type: TYPES.LIGHT

There are many different types in tileboard These include