Skip to content

Conversation

DrRSatzteil
Copy link
Contributor

@DrRSatzteil DrRSatzteil commented Oct 12, 2025

This PR does two things:

  1. Fixes uneccessary limitations for blink and fade text settings. The Awtrix firmware allows blinking and fading for both colored and segment colored text. Only color gradients are incompatible. The binding was limiting this before this change so that text could only blink and fade as long as the defaul color (white) was used.
  2. Until now, the rainbow property was overridden by every other effect: segment-colored-text, color, gradient, blink, fade. This means that you need to set all these channels to their default values or unlink the channels to be able to use the rainbow property. From an OH users perspective this is very unfortunate because activating the rainbow effect usually only requires you to activate a Switch item, but instead you would only see the effect once you changed potentially five other channel states (no easy on/off). Now the logic has been inverted so that rainbow overrides almost all other effects. This is a somewhat breaking change. Not for OH in itself but it will potentially change the way an existing app is styled on the Ulanzi clock. However this will only affect very few users if any at all and a fix would likely be relatively straight forward. Therefore I don't think this is an actual issue. The new segment-color-text feature will still override rainbow because it does not make sense to show the font-tags as text on the clock.

In addition to that this PR also fixes the README, because it was not correct about the order of overrides.

…e user friendly

Signed-off-by: Thomas Lauterbach <2452988+DrRSatzteil@users.noreply.github.com>
@DrRSatzteil DrRSatzteil changed the title Allow colored text to blink/fade and make overriding text effects mor… [mqtt.awtrix3] Allow blink/fade colored text and make text effects more user friendly Oct 12, 2025
@lsiepel lsiepel requested a review from Copilot October 16, 2025 07:48
@lsiepel lsiepel added the enhancement An enhancement or new feature for an existing add-on label Oct 16, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR relaxes text effect limitations and changes effect precedence to make rainbow easier to toggle while allowing blink/fade with colored text segments.

  • Allow blink/fade to work with colored text (including segment-colored via font tags)
  • Change precedence so rainbow overrides color/gradient/blink/fade (but is ignored when text has color tags)
  • Update tests and README to reflect new behavior and correct channel types/usability notes

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
bundles/org.openhab.binding.mqtt.awtrixlight/src/main/java/org/openhab/binding/mqtt/awtrixlight/internal/app/AwtrixApp.java Implements new effect precedence and allows blink/fade with color tags; adjusts color config when rainbow is enabled.
bundles/org.openhab.binding.mqtt.awtrixlight/src/test/java/org/openhab/binding/mqtt/awtrixlight/internal/HelperTest.java Updates tests to assert rainbow overrides fade and copy semantics accordingly.
bundles/org.openhab.binding.mqtt.awtrixlight/README.md Documents new precedence rules, fixes channel type for top-text, and updates examples.
Comments suppressed due to low confidence (1)

bundles/org.openhab.binding.mqtt.awtrixlight/README.md:1

  • Fix extra space in 'is set'.
# MQTT Awtrix 3 Binding

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Thomas Lauterbach <2452988+DrRSatzteil@users.noreply.github.com>
Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@lsiepel lsiepel merged commit 262d4da into openhab:main Oct 17, 2025
2 checks passed
@lsiepel lsiepel added this to the 5.1 milestone Oct 17, 2025
@DrRSatzteil DrRSatzteil deleted the multicolor branch October 17, 2025 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement An enhancement or new feature for an existing add-on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants