Skip to content
AWTRIX Flows
Submit flow
Home Assistant weather forecast shown on an AWTRIX display
Fig. 1 Home Assistant weather forecast, as Sysadmin runs it.

Home Assistant weather forecast

A simple guide to the Home Assistant weather forecast displayed on Ulanzi TC001 This Node-RED flow is designed to fetch the current weather state from Home Assistant, specifically from the `weather.home` entity. It processes attributes such as temperat

Specifications
System Node-RED
Firmware AWTRIX 3
Topic Smarthome
Built by Sysadmin
File GYpg5wR6OZE0.json · 6.0 KB
Icons
Published 11 Apr 2024 · updated 11 Apr 2024
Downloads 13
Download flow

Video tutorial: https://www.youtube.com/watch?v=k7aorpEz3yU

Here is a structured tutorial:

Part 1: Setting up Home Assistant Automation for Weather Data

  1. Trigger Setup: In Home Assistant, create a time-based automation to execute every 10 minutes.
  2. Action Configuration: Utilize the mqtt.publish service to send the weather data. Format the payload with necessary weather attributes (temperature, condition, etc.).
{
  "text": "Temp {{ state_attr('weather.home', 'temperature') }}°C, Humidity {{ state_attr('weather.home', 'humidity') }}%, Wind {{ state_attr('weather.home', 'wind_speed') }}km/h, Pressure {{ state_attr('weather.home', 'pressure') }}hPa",
  "icon": "53288",
  "rainbow": false,
  "duration": 30
}
  1. MQTT Topic: Define a unique MQTT topic for this automation.
  • pattern: prefix/custom/name_of_the_panel

Part 2: Creating a Node-RED Flow for Ulanzi TC001 Display

  1. Trigger Node: Use an Inject node set to trigger every 10 minutes.
  2. Weather Data: Utilize an "api-current-state" node to fetch the latest weather state from weather.home.
  3. Data Formatting: Add a Function node where you convert weather states into messages, using a mapping object (iconMap) for weather conditions to icon IDs specific to Ulanzi TC001.
  4. MQTT Communication: Add an "MQTT out" node configured with your broker details, and set to publish the formatted message to the Ulanzi TC001.

This process includes fetching weather updates from Home Assistant, formatting them appropriately in Node-RED, and then sending the formatted data to the Ulanzi TC001 display via MQTT. Remember to adjust the mapping between weather states and icon IDs according to your display's requirements and the available icons.

Assets: icons you will find here: https://developer.lametric.com/icons. So just use it according to your needs.

The flow is in json format that you can import to Node-RED. Remember to change the IP address and topic everywhere according to the explanation in the video.

More flows for Node-RED or Smarthome

Something wrong with this flow? Report it.