All plugins
Keypad plugin preview

Keypad

A keypad on the screen: the right code unlocks a lock, opens a cover or switches a light, a script or a scene.

By mifricke · v0.6.0 · Community

No rating yetRatings come from people who run it, in the Tessera app
0people like it, some without running it
1home uses it, of those who share that

On each screen

ScreenRatingRatingsHomes
Guition 4″ · ESP32-S3-4848S040Not yet01
How these numbers are counted

Everything here is shared by choice from the Tessera app, one per installation of the app, without an account. A like can come from anyone, also from someone who does not run the plugin. A rating comes from someone who has run it on a screen for a few days, and shows from 3 ratings. Homes are the installations that agreed to be counted and said in the last 30 days that they run it.

These are not verified installations or a quality score. Reinstalls and lost keys can affect them, and one home network adds at most two of each to a plugin.

What the app shares

A keypad on your Tessera screen. Type the right code and the screen runs an action in Home Assistant: it unlocks a lock, opens a garage door, switches a light or a switch, runs a script or a scene, or presses a button.

The code is checked on the screen, so it is stored in the screen's layout and on the screen itself. Use it for convenience, such as letting family in, and not as the only protection of a door.

Set up

  1. In Tessera, open Plugins, choose Add with a link and paste https://github.com/mifricke/tessera-keypad.
  2. Add the plugin to a screen. The screen builds once.
  3. In Layout, place the Keypad tile from the library's Plugins group.
  4. In the inspector, search for and choose the Entity the code switches, and fill in the Code (4 to 8 digits). The list offers only entities the code can switch.
  5. Tap the tile on the screen, type the code, and the action runs.

What the right code does

Entity Action
Lock lock.unlock
Cover (a garage door, a gate) cover.open_cover
Switch switch.toggle
Input boolean input_boolean.toggle
Light light.toggle
Script script.turn_on
Scene scene.turn_on
Button button.press

To do something else, such as sending a notification or opening two locks, write a script in Home Assistant and choose that script on the tile.

Options

  • Entity: what the right code switches, chosen from a list you can search.
  • Code: the digits that open.
  • Code only to open: off (the default), every tap opens the keypad. On, a tap locks a lock, closes a cover or switches a light, switch or input boolean off at once, without the code; the tile says so ("Tap to lock"). Unlocking, opening and switching on still take the code, and a script, a scene or a button always does.
  • Check the code by itself: on (the default), the keypad checks the code as soon as its last digit is typed, so no check key is needed. Off, only the check key checks it: the keypad then never tells how long the code is.
  • Code from a helper: instead of typing the code into the tile, choose a helper in Home Assistant that holds it (below). When a helper is chosen, its code counts and the Code above is not used.
  • Wrong tries and Wait after wrong tries: after this many wrong codes in a row the keypad takes no code for a while and counts down.

The code from a helper in Home Assistant

The code can live in Home Assistant instead of in Tessera, so it can be changed there, or by an automation, without opening Tessera and without building the screen again.

  1. In Home Assistant, open Settings, Devices & services, Helpers, and create a Text helper. Set its mode to Password so the code is hidden in the dashboard, and its maximum length to 16.
  2. Type the code as its value: 4 to 16 digits.
  3. In Tessera, choose that helper under Code from a helper on the tile.

A new value counts within seconds, also on a keypad that is open. While the helper is unavailable, or holds anything but digits, the keypad takes no code at all and says so.

The Password mode only hides the code in Home Assistant's dashboard. The state itself is plain text: it is in the history and the logbook, and everyone who can use Home Assistant or its API can read it. Leave the helper out of the recorder (recorder: exclude: entities: in configuration.yaml). As with a code typed into the tile, the screen checks the code, so it also reaches the screen.

Tried on

  • On a real screen: the Guition 4848S040 (4-inch, 480 x 480), with a light switched by the right code.
  • On the plugin bench (the real firmware, built for a computer): the 2.8-inch CYD, the Guition 4848S040, a 4.3-inch Waveshare standing up and a 10.1-inch Guition JC8012P4A1, light and dark, at every size the tile offers there.

Good to know

  • The screen must be allowed to perform actions in Home Assistant (Tessera sets this up when it adds a screen).
  • A light, a switch and an input boolean are switched over: off goes on, on goes off.
  • The keypad closes by itself a moment after the right code. When the code could not be sent, it says so and stays open.
  • The X key clears what was typed.