Skip to content
AWTRIX Flows
Submit flow
Weather from Home Assistant Entity shown on an AWTRIX display
Fig. 1 Weather from Home Assistant Entity, as Colton Dick runs it.

Weather from Home Assistant Entity

This automation triggers whenever the weather entity changes and it'll sent weather and humidity data for Kamloops to two Awtrix clocks via MQTT. It dynamically selects appropriate weather icons based on the current conditions (e.g., clear, cloudy, rainy)

Specifications
System Home Assistant
Firmware AWTRIX 3
Topic Smarthome
Built by Colton Dick
File zB23Oe9pOrLJ.yaml · 3.4 KB
Icons 10
Published 12 Oct 2024 · updated 12 Oct 2024
Downloads 6

Set Weather from Home Assistant Entity

This Home Assistant automation, titled "Set Weather from Home Assistant Entity", is designed to publish current weather and humidity data for Kamloops to two Awtrix clocks using MQTT. The automation runs every 15 minutes and sends the data in a JSON format, allowing the clocks to display up-to-date information about temperature, humidity, and weather conditions.

Key Features:

  1. Trigger:

    • The automation is set to trigger whenever the weather entity changes, ensuring that both Awtrix clocks are updated regularly with the latest weather data.
  2. MQTT Publishing:

    • The automation uses the mqtt.publish service to send MQTT messages to the topics awtrix_clock_1/custom/weather, awtrix_clock_2/custom/weather, awtrix_clock_1/custom/humidity, and awtrix_clock_2/custom/humidity.
    • The payload for each message is dynamically generated based on the current weather conditions and humidity.
  3. Dynamic Weather Icon Selection:

    • The automation selects an appropriate icon based on the current weather conditions in Kamloops. For instance:
      • Clear sky (day) uses icon 2282.
      • Clear sky (night) uses icon 12181.
      • Partly cloudy uses icon 53384.
      • Cloudy uses icon 53802.
      • Rain uses icon 2284.
      • Lightning uses icon 49299.
      • Snow uses icon 2289.
      • Fog uses icon 17055.
    • This ensures that the clocks display relevant visuals based on real-time weather data.
  4. Temperature and Humidity:

    • The temperature data is displayed alongside the weather icon in Celsius (e.g., "22°C").
    • Humidity is sent as a percentage with a dedicated icon 2423, displaying values like "45%" on the clock.
  5. Multiple Clocks:

    • The automation updates two separate Awtrix clocks (awtrix_clock_1 and awtrix_clock_2), ensuring that both devices are synchronized and show the same information.
  6. Customization:

    • The MQTT message has fields like repeat, icon, and text, allowing customization of the display on the Awtrix devices. The repeat value is set to 1, ensuring that the display information is updated regularly without excessive repetition.

Technical Overview:

  • The automation relies on the weather.kamloops entity, which retrieves weather information for Kamloops through an integration like OpenWeatherMap.
  • The mqtt.publish service sends structured JSON payloads to the specified topics, ensuring that both temperature and humidity data are transmitted to the clocks.
  • With each run of the automation, both Awtrix clocks receive fresh data and update their displays accordingly, providing real-time, visually rich feedback about the current weather and environmental conditions.

This automation ensures that your Awtrix clocks stay up-to-date with weather and humidity data, providing a seamless integration with Home Assistant through MQTT.

More flows for Home Assistant or Smarthome

Something wrong with this flow? Report it.