Skip to content

Conversation

Zippochonda
Copy link

@Zippochonda Zippochonda commented Jul 18, 2025

I added a support for a 11x11 Wordclock and integrated a SVG from https://github.com/panbachi/wordclock that I used before

Summary by CodeRabbit

  • New Features

    • Added support for 11x11 pixel matrix configuration in the word clock, alongside the existing 11x10 and meander wiring options.
    • Users can now select the 11x11 wiring layout through configuration.
  • Documentation

    • Updated documentation to describe support for the 11x11 matrix and explain the new wiring configuration switch.
    • Added a detailed Home Assistant integration guide for controlling and monitoring the Word Clock usermod.

Copy link
Contributor

coderabbitai bot commented Jul 18, 2025

Walkthrough

The word clock usermod was updated to support both 11x10 and 11x11 pixel matrix configurations by adjusting LED count macros and remapping LED indices in mask arrays. Documentation was revised to include details about the new 11x11 grid option and updated wiring pattern switches. JSON config and state handling were extended to accommodate the new wiring option and revised key naming.

Changes

Files/Group Change Summary
Documentation
usermods/usermod_v2_word_clock/readme.md
Updated documentation to include support for 11x11 pixel matrix, expanded wiring pattern switch explanation, added a new section on the 11x11 grid referencing external SVG graphics, and included a Home Assistant integration guide.
Core usermod implementation
usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp
Increased LED count from 114 to 121; added boolean flag for 11x11 wiring variant; introduced new mask size macros and LED index arrays for 11x11 and its meander variant; adjusted existing minute and hour masks and dots; extended maskLedsOn array; updated setHours and setMinutes methods to select masks based on 11x11 and meander flags; renamed JSON key for meander wiring and added new key for 11x11 wiring in config serialization and deserialization; updated JSON state handling to nest usermod active state; minor comment typo fix.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@DedeHai
Copy link
Collaborator

DedeHai commented Jul 18, 2025

adding the svg violates the license. just add a link in the readme.

@Hasenpups can you please review? I think you added the original.

Added a Link to the source of the SVG
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
usermods/usermod_v2_word_clock/readme.md (2)

3-3: Use the correct indefinite article.

“…or an 11x11 pixel matrix…”
Small grammar tweak keeps the intro professional.

-This usermod drives an 11x10 or a 11x11 pixel matrix wordclock with WLED.
+This usermod drives an 11x10 or an 11x11 pixel matrix word-clock with WLED.

21-22: Fix typos and replace bare URL; double-check license wording.

  1. Spelling: “integreated” → “integrated”, “Grafics” → “graphics”.
  2. Style: avoid bare URL (MD034).
  3. Licensing: make it explicit that the SVG itself is not shipped and that the link respects the original license (the current phrasing “I integrated the graphics” could be read as embedding).
-## 11x11 Grid
-I integreated the Grafics from https://github.com/panbachi/wordclock/blob/master/graphics/plate/de_DE_s1.svg  
+## 11×11 Grid
+The 11×11 layout is based on the external SVG  
+[de_DE_s1.svg](https://github.com/panbachi/wordclock/blob/master/graphics/plate/de_DE_s1.svg) (linked only, not redistributed here; please refer to the original repository for licensing details).

Please confirm that no copy of the SVG is committed elsewhere in the PR to stay license-compliant.
If you like, I can script-search the tree for stray .svg additions.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e06c271 and fa2286a.

📒 Files selected for processing (1)
  • usermods/usermod_v2_word_clock/readme.md (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: KrX3D
PR: wled/WLED#4585
File: usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.h:121-137
Timestamp: 2025-04-27T10:06:22.545Z
Learning: In the Seven Segment Display Reloaded usermod, the dimension mismatch between the default array (umSSDRNumbers[11][7]) and the override (umSSDRNumbers[11][10] = umSSDR_NUMBERS) is intentional by design, allowing for different use cases with varying numbers of segments per digit.
Learnt from: willmmiles
PR: wled/WLED#4623
File: usermods/word-clock-matrix/word-clock-matrix.cpp:332-332
Timestamp: 2025-03-29T01:22:54.617Z
Learning: In the WLED project, hardcoded usermod IDs (like 500 in the WordClockMatrix's getId() method) are intentionally used as part of a strategy to avoid modifying core code. There are plans to remove numeric usermod IDs entirely in the future.
Learnt from: DedeHai
PR: wled/WLED#4682
File: wled00/FX.cpp:9016-9039
Timestamp: 2025-05-09T18:48:21.296Z
Learning: WLED does not support matrices large enough (≥1024 px) for 32-bit overflow in dx*dx + dy*dy to be a practical concern in particle system effects.
usermods/usermod_v2_word_clock/readme.md (5)
Learnt from: willmmiles
PR: wled/WLED#4623
File: usermods/word-clock-matrix/word-clock-matrix.cpp:332-332
Timestamp: 2025-03-29T01:22:54.617Z
Learning: In the WLED project, hardcoded usermod IDs (like 500 in the WordClockMatrix's getId() method) are intentionally used as part of a strategy to avoid modifying core code. There are plans to remove numeric usermod IDs entirely in the future.
Learnt from: KrX3D
PR: wled/WLED#4585
File: usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.h:121-137
Timestamp: 2025-04-27T10:06:22.545Z
Learning: In the Seven Segment Display Reloaded usermod, the dimension mismatch between the default array (umSSDRNumbers[11][7]) and the override (umSSDRNumbers[11][10] = umSSDR_NUMBERS) is intentional by design, allowing for different use cases with varying numbers of segments per digit.
Learnt from: netmindz
PR: wled/WLED#4728
File: wled00/FX.h:378-378
Timestamp: 2025-06-15T09:59:52.720Z
Learning: In WLED's FX.h, MODE_COUNT represents the highest FX_MODE_ ID + 1, not the total count of FX_MODE_ definitions. This is because some effects may have been removed but their IDs are not reused, creating gaps in the numbering sequence. MODE_COUNT is used for array bounds and range checking.
Learnt from: netmindz
PR: wled/WLED#4728
File: wled00/FX.h:378-378
Timestamp: 2025-06-15T09:59:52.720Z
Learning: In WLED's FX.h, MODE_COUNT represents the highest FX_MODE_ ID + 1, not the total count of FX_MODE_ definitions. This is because some effects may have been removed but their IDs are not reused, creating gaps in the numbering sequence. MODE_COUNT is used for array bounds and range checking.
Learnt from: KrX3D
PR: wled/WLED#4585
File: usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.h:121-136
Timestamp: 2025-04-27T09:37:28.415Z
Learning: Using PROGMEM for the seven-segment font array (umSSDRNumbers) in the WLED SSDR usermod causes compilation problems, so it should be left as a regular array.
🪛 LanguageTool
usermods/usermod_v2_word_clock/readme.md

[grammar] ~3-~3: Ensure spelling is correct
Context: # Word Clock Usermod V2 This usermod drives an 11x10 or a 11x11 pixel matrix...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~22-~22: Ensure spelling is correct
Context: ... grid. ## 11x11 Grid I integreated the Grafics from https://github.com/panbachi/wordcl...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.17.2)
usermods/usermod_v2_word_clock/readme.md

22-22: Bare URL used

(MD034, no-bare-urls)

@Zippochonda
Copy link
Author

I added the Link in the readme.txt

It is https://github.com/panbachi/wordclock/blob/master/graphics/plate/de_DE_s1.svg

Mapping wrong at 11x11 ---> eins
Added map for a 2d Matrix in Meanderwiring
Added meander wiring for a 2d Matrix 11x11
Add the Status of the usermod in JSON, so that you can switch off and on the Usermod remotely for Example with Home Assistant
Added the integration into Homeassist
Added HA Configuration
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
usermods/usermod_v2_word_clock/readme.md (1)

8-9: Fix the option name typo (“diplayItIs”).
The flag is spelled displayItIs in code; the doc currently shows diplayItIs, which will mislead users.

-diplayItIs: enable/disable display of "Es ist" on the clock
+displayItIs: enable/disable display of "Es ist" on the clock
🧹 Nitpick comments (3)
usermods/usermod_v2_word_clock/readme.md (3)

3-3: Use the correct article and casing for “11x11 Word Clock”.
“11” is pronounced “eleven”, so it takes the article an. Also, “Word Clock” is a proper noun in this context.

-This usermod drives an 11x10 or a 11x11 pixel matrix wordclock with WLED.
+This usermod drives an **11×10** or **an 11×11** pixel-matrix **Word Clock** with WLED.

21-23: Correct spelling and convert bare URL to Markdown link.
Minor language issues (“integreated”, “Grafics”) and MD034 violation.

-## 11x11 Grid
-I integreated the Grafics from https://github.com/panbachi/wordclock/blob/master/graphics/plate/de_DE_s1.svg  
+## 11×11 Grid
+I integrated the graphics from \
+[panbachi/wordclock – de_DE_s1.svg](https://github.com/panbachi/wordclock/blob/master/graphics/plate/de_DE_s1.svg)  

68-101: Normalise unordered list style and indentation.
markdownlint flags inconsistent use of - vs * and mixed indentation levels. Unifying to a single style keeps the doc lint-clean.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9b865fb and 46eb6b2.

📒 Files selected for processing (2)
  • usermods/usermod_v2_word_clock/readme.md (3 hunks)
  • usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp (13 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • usermods/usermod_v2_word_clock/usermod_v2_word_clock.cpp
🧰 Additional context used
🪛 LanguageTool
usermods/usermod_v2_word_clock/readme.md

[grammar] ~3-~3: Ensure spelling is correct
Context: # Word Clock Usermod V2 This usermod drives an 11x10 or a 11x11 pixel matrix...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~22-~22: Ensure spelling is correct
Context: ... grid. ## 11x11 Grid I integreated the Grafics from https://github.com/panbachi/wordcl...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.17.2)
usermods/usermod_v2_word_clock/readme.md

22-22: Bare URL used

(MD034, no-bare-urls)


68-68: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


68-68: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


71-71: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


71-71: Unordered list indentation
Expected: 2; Actual: 6

(MD007, ul-indent)


78-78: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


78-78: Unordered list indentation
Expected: 0; Actual: 2

(MD007, ul-indent)


79-79: Unordered list style
Expected: asterisk; Actual: dash

(MD004, ul-style)


79-79: Unordered list indentation
Expected: 2; Actual: 6

(MD007, ul-indent)

Comment on lines +19 to +20
I added a switch in usermod called "meanderwiring" to enable/disable the alternate wiring pattern and a switch for the 11x11 grid.

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Synchronise key names with the implementation.
Code renamed the JSON key to meanderWiring and added wiring11x11 (or eleven) for the grid size. The doc still references "meanderwiring" and a generic “switch for the 11x11 grid”. Update to avoid configuration mismatches.

-I added a switch in usermod called "meanderwiring" to enable/disable the alternate wiring pattern and a switch for the 11x11 grid.
+The usermod now exposes two Boolean options  
+* **meanderWiring** – enable/disable the alternate meander wiring pattern  
+* **wiring11x11**   – select the 11 × 11 grid instead of the default 11 × 10
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
I added a switch in usermod called "meanderwiring" to enable/disable the alternate wiring pattern and a switch for the 11x11 grid.
@@ -19,1 +19,3 File: usermods/usermod_v2_word_clock/readme.md
-I added a switch in usermod called "meanderwiring" to enable/disable the alternate wiring pattern and a switch for the 11x11 grid.
+The usermod now exposes two Boolean options
+* **meanderWiring** – enable/disable the alternate meander wiring pattern
+* **wiring11x11** – select the 11 × 11 grid instead of the default 11 × 10
🤖 Prompt for AI Agents
In usermods/usermod_v2_word_clock/readme.md around lines 19 to 20, the
documentation uses outdated key names "meanderwiring" and a generic description
for the 11x11 grid switch. Update the documentation to use the exact JSON key
names "meanderWiring" and "wiring11x11" (or "eleven") as implemented in the code
to ensure consistency and prevent configuration mismatches.

Comment on lines 51 to 65
YAML

# configuration.yaml

# 1. REST command to send on/off commands to the WLED usermod
rest_command:
wled_wordclock_set:
# REPLACE: Enter the IP address of your WLED device here
url: "http://YOUR_WLED_IP_ADDRESS/json/state"
method: "POST"
headers:
Content-Type: "application/json"
# Forces 'true'/'false' to be lowercase to generate valid JSON
payload: '{"WordClockUsermod":{"active":{{ active | string | lower }}}}'

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Wrap the Home Assistant snippet in a fenced code block.
Without back-ticks the YAML loses indentation when copied, leading to parsing errors.

-YAML
+# Home Assistant – configuration.yaml
+```yaml
 # configuration.yaml
 ...
 # Forces 'true'/'false' to be lowercase to generate valid JSON
 payload: '{"WordClockUsermod":{"active":{{ active | string | lower }}}}'
+``` 
🤖 Prompt for AI Agents
In usermods/usermod_v2_word_clock/readme.md between lines 51 and 65, the YAML
snippet for the Home Assistant configuration is not enclosed in a fenced code
block, causing indentation loss and parsing errors when copied. To fix this,
wrap the entire YAML snippet with triple back-ticks (```) before and after the
code block, specifying 'yaml' after the opening back-ticks to preserve
formatting and syntax highlighting.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
usermods/usermod_v2_word_clock/readme.md (1)

19-20: Synchronise JSON key names with the implementation.
Same issue was flagged earlier; the doc still lists the old keys.

🧹 Nitpick comments (4)
usermods/usermod_v2_word_clock/readme.md (4)

3-3: Fix article agreement (“an 11×11”).

Change “a 11x11” → “an 11x11” for correct grammar.

-This usermod drives an 11x10 or a 11x11 pixel matrix wordclock with WLED.
+This usermod drives an 11x10 or an 11x11 pixel-matrix word clock with WLED.

22-23: Spelling & markdown polish for the 11×11 section.

  1. “Integreated” → “integrated” and “Grafics” → “graphics”.
  2. Wrap bare URL in markdown link to satisfy MD034.
-## 11x11 Grid
-I integreated the Grafics from https://github.com/panbachi/wordclock/blob/master/graphics/plate/de_DE_s1.svg  
+## 11×11 Grid
+I integrated the graphics from \
+[panbachi/wordclock › de_DE_s1.svg](https://github.com/panbachi/wordclock/blob/master/graphics/plate/de_DE_s1.svg)  

51-52: Remove stray “YAML” label and rely on a fenced code block header.
This single word adds no value and breaks linting rules.

-YAML
-
-`configuration.yaml`
+`configuration.yaml`

54-54: Specify the language on the fenced block.

Add yaml after the opening back-ticks to satisfy MD040 and keep indentation when copied.

-```
+```yaml
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 46eb6b2 and 4007a53.

📒 Files selected for processing (1)
  • usermods/usermod_v2_word_clock/readme.md (3 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: willmmiles
PR: wled/WLED#4623
File: usermods/word-clock-matrix/word-clock-matrix.cpp:332-332
Timestamp: 2025-03-29T01:22:54.617Z
Learning: In the WLED project, hardcoded usermod IDs (like 500 in the WordClockMatrix's getId() method) are intentionally used as part of a strategy to avoid modifying core code. There are plans to remove numeric usermod IDs entirely in the future.
Learnt from: KrX3D
PR: wled/WLED#4585
File: usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.h:121-137
Timestamp: 2025-04-27T10:06:22.545Z
Learning: In the Seven Segment Display Reloaded usermod, the dimension mismatch between the default array (umSSDRNumbers[11][7]) and the override (umSSDRNumbers[11][10] = umSSDR_NUMBERS) is intentional by design, allowing for different use cases with varying numbers of segments per digit.
📚 Learning: in the wled project, hardcoded usermod ids (like 500 in the wordclockmatrix's getid() method) are in...
Learnt from: willmmiles
PR: wled/WLED#4623
File: usermods/word-clock-matrix/word-clock-matrix.cpp:332-332
Timestamp: 2025-03-29T01:22:54.617Z
Learning: In the WLED project, hardcoded usermod IDs (like 500 in the WordClockMatrix's getId() method) are intentionally used as part of a strategy to avoid modifying core code. There are plans to remove numeric usermod IDs entirely in the future.

Applied to files:

  • usermods/usermod_v2_word_clock/readme.md
📚 Learning: in the seven segment display reloaded usermod, the dimension mismatch between the default array (ums...
Learnt from: KrX3D
PR: wled/WLED#4585
File: usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.h:121-137
Timestamp: 2025-04-27T10:06:22.545Z
Learning: In the Seven Segment Display Reloaded usermod, the dimension mismatch between the default array (umSSDRNumbers[11][7]) and the override (umSSDRNumbers[11][10] = umSSDR_NUMBERS) is intentional by design, allowing for different use cases with varying numbers of segments per digit.

Applied to files:

  • usermods/usermod_v2_word_clock/readme.md
📚 Learning: in wled's fx.h, mode_count represents the highest fx_mode_ id + 1, not the total count of fx_mode_ d...
Learnt from: netmindz
PR: wled/WLED#4728
File: wled00/FX.h:378-378
Timestamp: 2025-06-15T09:59:52.720Z
Learning: In WLED's FX.h, MODE_COUNT represents the highest FX_MODE_ ID + 1, not the total count of FX_MODE_ definitions. This is because some effects may have been removed but their IDs are not reused, creating gaps in the numbering sequence. MODE_COUNT is used for array bounds and range checking.

Applied to files:

  • usermods/usermod_v2_word_clock/readme.md
📚 Learning: using progmem for the seven-segment font array (umssdrnumbers) in the wled ssdr usermod causes compi...
Learnt from: KrX3D
PR: wled/WLED#4585
File: usermods/seven_segment_display_reloaded_v2/seven_segment_display_reloaded_v2.h:121-136
Timestamp: 2025-04-27T09:37:28.415Z
Learning: Using PROGMEM for the seven-segment font array (umSSDRNumbers) in the WLED SSDR usermod causes compilation problems, so it should be left as a regular array.

Applied to files:

  • usermods/usermod_v2_word_clock/readme.md
📚 Learning: in wled, essential configuration files that require backup have short, controlled names (like "/cfg....
Learnt from: DedeHai
PR: wled/WLED#4793
File: wled00/file.cpp:481-513
Timestamp: 2025-07-31T18:21:49.868Z
Learning: In WLED, essential configuration files that require backup have short, controlled names (like "/cfg.json", "/presets.json") that are well within a 32-character buffer limit. The file naming is controlled by developers, making buffer overflow in backup filename construction highly unlikely.

Applied to files:

  • usermods/usermod_v2_word_clock/readme.md
🪛 LanguageTool
usermods/usermod_v2_word_clock/readme.md

[grammar] ~3-~3: Ensure spelling is correct
Context: # Word Clock Usermod V2 This usermod drives an 11x10 or a 11x11 pixel matrix...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~22-~22: Ensure spelling is correct
Context: ... grid. ## 11x11 Grid I integreated the Grafics from https://github.com/panbachi/wordcl...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 markdownlint-cli2 (0.17.2)
usermods/usermod_v2_word_clock/readme.md

22-22: Bare URL used

(MD034, no-bare-urls)


54-54: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

active: false
# Uses the state of the sensor to display the switch state (on/off)
state: >
{{ is_state('sensor.wled_wordclock_status', 'True') }}
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Boolean comparison uses wrong capitalisation.

value_json returns lowercase true/false; comparing to 'True' will keep the switch permanently off.

-  {{ is_state('sensor.wled_wordclock_status', 'True') }}
+  {{ is_state('sensor.wled_wordclock_status', 'true') }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{ is_state('sensor.wled_wordclock_status', 'True') }}
{{ is_state('sensor.wled_wordclock_status', 'true') }}
🤖 Prompt for AI Agents
In usermods/usermod_v2_word_clock/readme.md at line 92, the boolean comparison
uses incorrect capitalization by comparing to the string 'True'. Change the
comparison to use lowercase 'true' to match the actual value returned by
value_json, ensuring the switch functions correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants