Skip to content

New Share your ideas with the AWTRIX community. Keep your creations together in your account.

Sign in

Which AWTRIX do you have? Choose it once and the Hub shows what runs on it.

ModuleAWTRIX NG

HASS library

On an AWTRIX display
HASS library shown on an AWTRIX display
HASS library · by 10der

For your scripts

HASS library

A module, not an app: it shows nothing by itself and adds functions that your scripts import.

Which AWTRIX do you have? See below where it runs, or choose your device.
Topic
Smarthome
Includes
Module

Runs on

  • Runs on 32×8 (TC001 & DIY)
  • Runs on 52×16 (TC002)
  • Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.

Choose your display in the next step.

Send to AWTRIX

Choose your AWTRIX

HASS libraryAWTRIX NG module

Install this script on your AWTRIX NG. Its icons and sounds are installed with it.

Your AWTRIX’s local address, for example 192.168.178.39 or awtrix.local.

The name shown in your AWTRIX script list. Use letters, digits, hyphens or underscores.

Connection & device login

Connect your phone or computer to the same network as your AWTRIX. Allow local network access if your browser asks.

Use the device’s IP address, without a page path such as /#/apps.

If your AWTRIX requires a login, the username and password fields will appear when you connect.

Sign in to the Hub to install scripts. Attached files are installed separately.

Is this your script?

If you created this script, open your saved edit link to add it to your account. You can then manage it whenever you sign in. Adding it to your account replaces the edit link.

Script description

# @module
# @config  hass_url text  "Hass URL"   default="http://homeassistant.lan:8123"
# @config  hass_token text "Hass token" default=""

var hass_config = module("hass_config")
hass_config.hass_url = store.get("hass_url")
hass_config.hass_token = store.get("hass_token")
import hass
import hass_config

hass.init(hass_config.hass_url, hass_config.hass_token)      
def init()
     hass.int(self.home_temp_entity,
end

      def(value, error)
        if error != nil
          log("Home Assistant error: " + error)
          return
        end

        if value == nil
          log("Temperature attribute is nil")
          return
        end

        self.temp = value

        # log("Temperature: " + str(self.temp))
      end
    )

More scripts in Smarthome

Something wrong with this script? Report it.